Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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. For example, if the following numbers are input 8 10 The output should be: Hint: When you don't know the number of repetitions, always use while loop. code.py New Full Screen 1 num_str input("Input an int: " 2 #Prompt the user to enter the input. 4 num_str -input ("Input an int: ") 6 #De fine a variable to 7 #store the sum of the 10 #values entered by the user. 12 total0 13 14 #Run the loop tii the user enters 10. 15 16 while num_str-10: 17 Dark Theme 4 Spaces
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started