Computer Science, asked by latasanti31, 3 months ago

write a program to display the sum of numbers from 50 to 1.​

Answers

Answered by todkarianushka012
1

Explanation:

Sum=0#variable which holds the sum value. for x in range(1,51):#For loop which runs from 1 to 50 and access the number. Sum=Sum+x# It add the number. print("The Sum of 1 to 50 number is: ",Sum)#It will prints the sum value of all the numbers.

Similar questions