Jan-18-2018, 10:54 PM
# [ ] use a "forever" while loop to get user input of integers to add to sum,
# until a non-digit is entered, then break the loop and print sum
sum = 0
the best I was able to think up doesn't work
# until a non-digit is entered, then break the loop and print sum
sum = 0
the best I was able to think up doesn't work
while True: sum = '' sum1 = input("add number: ") if sum1.isdigit(): sum = sum + sum1 else: break print(sum)Suggestions are welcome.