write a program to display the sum of numbers from 50 to 1.
Answers
Answered by
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