270,409 views
33 votes
33 votes
Basic python coding, What is the output of this program? Assume the user enters 2, 5, and 10.

numA = 0
for count in range(3):
answer = input ("Enter a number: ")
fltAnswer = float(answer)
numA = numA + fltAnswer
print (numA)
Thanks in advance!
:L

User Tommy King
by
2.7k points

1 Answer

10 votes
10 votes

Answer:

17.0

Step-by-step explanation:

I ran it for you. You could also try that (go to replit).

Basic python coding, What is the output of this program? Assume the user enters 2, 5, and-example-1
User Robert Rendell
by
2.7k points