Python coding question?

Given a series of numbers as input, add them up until the input is 10 and print the total. I used the code below to answer this question, but it is not returning output for me. Do not add the final 10. num_str = input("Input an int: ") num_int = int(num_str) x = 0 while num_int != 10: x += num_int -... show more Given a series of numbers as input, add them up until the input is 10 and print the total. I used the code below to answer this question, but it is not returning output for me.

Do not add the final 10.
num_str = input("Input an int: ")
num_int = int(num_str)
x = 0
while num_int != 10:
x += num_int - 10
if num_int == 10:
print(x)
4 answers 4