Programming Examples

Python program to display the first ten terms of the following series 2 5 10 17


Write a Python code to display the first ten terms of the following series

2, 5, 10, 17,……………………………..

Solution:
print("The first ten terms of the series:")
for a in range(1, 11):
    p=a*a+1
    print(p, end=' ')
Output

The first ten terms of the series:

2 5 10 17 26 37 50 65 82 101 

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad