write a program in Python to print the series 1 2 4 7 11 16 72 ..... upto n terms
Answers
Answered by
5
Answer:
n = int(input("Enter Number of tries: "))
step = 1
count = 1
while step!=n+1:
print(count)
count += step
step +=1
Explanation:
'n' will be the number of tries. The code will loop until the skip count value reaches the number of required tries, then it will stop.
Answered by
6
n = int(input("enter a number of series"))
first = 1
second = 0
for i in range(0 , num):
first = first + second
print(first)
second = second + 1
Similar questions