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