Robotics & Artificial Intelligence
Design Python code to find and display the sum of the following series:
s = 1 + 4 + 9 + …………… + 400
Python Control Flow
2 Likes
Answer
s = 0
for i in range(1, 21):
s = s + i*i
print("Sum of the series =", s)Output
Sum of the series = 2870
Answered By
1 Like
Related Questions
Write Python code to display the first ten terms of the following series:
1, 2, 4, 7, 11, ……………
Write Python code to display the first ten terms of the following series:
2, 5, 10, 17, ……………
Design Python code to find and display the sum of the following series:
s = (1*2) + (2*3) + …………… + (19*20)
Write Python code to find the sum of the given series:
1 + (1+2) + (1+2+3) + …………… + (1+2+3+……………+n)