Write a program that uses a while loop to add up all the even numbers between
100 and 200. using python
Answers
Answered by
2
Explanation:
Python Program to Calculate Sum of Even Numbers from 1 to N
maximum = int(input(" Please Enter the Maximum Value : "))
total = 0
for number in range(1, maximum+1):
if(number % 2 == 0):
print("{0}".format(number))
total = total + number
print("The Sum of Even Numbers from 1 to {0}={1}".format(number, total))
Similar questions
English,
9 hours ago
Math,
9 hours ago
Chemistry,
9 hours ago
Social Sciences,
18 hours ago
Physics,
8 months ago