1,2,4,7,11 in loop python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

1,2,4,7,11 in loop python

Show the loop program of the Q

1st Sep 2023, 6:31 AM
Nayanika Barua
Nayanika Barua - avatar
3 Answers
+ 6
Nayanika Barua , don't expect others to solve the question for you...try your code and If you face any difficulties you can ask here with your attempted code...
1st Sep 2023, 8:28 AM
Riya
Riya - avatar
+ 2
The difference increases by 1 from number to number. Therefore you should be able to find the simple Python solution yourself.
1st Sep 2023, 1:36 PM
Niels F 🇩🇪 <html challenger>
Niels F 🇩🇪 <html challenger> - avatar
+ 1
j = 1 for i in range(5): print(j) j += i + 1
2nd Feb 2024, 9:25 PM
Joël Egger
Joël Egger - avatar