Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def square_series(n):
- sum = 0
- while n >= 0:
- sum = sum + n**2
- n = n - 1
- return sum
- sum = square_series(int(input("Enter number n : ")))
- print("Sum of 0²+1²+......+n² is:",sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement