Computer Science, asked by HZG27, 6 months ago

Anu wishes to prepare a program to display the value of numbers from 1 to 25. The program that Anu prepared is given below. There are some errors in it. Can you edit the errors? s=0 for i in range(25): s=s+i print(s)

Answers

Answered by darshansuprathik
0

Answer:

wrong syntax for i in range

Explanation:

instead of having i in range (25), anu should have i in range(0,26). there is no other mistake in the programm. the program will consider it one number before so the output will be 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25

Similar questions