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 

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials 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 Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz