Given a series of numbers as input, add them up until the input is 10 and print the total. Do not add the final 10.

Respuesta :

The program is an illustration of loops

What are loops?

Loops are program statements that are used to perform repetitive operations

The actual program

The program in Python, where comments are used to explain each line is as follows:

#This initializes the sum of numbers to 0

total = 0

#This gets input for the first number

num = int(input())

#The following loop is repeated while the input is not 10

while num != 10:

   #This adds all the inputs from the user

   total+=num

   #This gets another input

   num = int(input())

#This prints the total    

print(total)

Read more about loops at:

https://brainly.com/question/14284157

ACCESS MORE
EDU ACCESS