Write a program that reads in a series of numbers and adds them up until the user enters zero (this stopping value is often called a rogue value).
1
Expert's answer
2020-05-29T13:18:06-0400
ROGUE_VALUE = 0
sum = 0
while True:
number = float(input("Enter number:"))
if number == ROGUE_VALUE:
break
sum += number
print("sum is {}".format(sum))
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment