199k views
1 vote
Question # 6

Math Formula
What is the output of this program? Assume the user enters 2, 5, 1, and 6.

numA = 0
for count in range(4):
answer = input ("Enter a number: ")
fltAnswer = float(answer)
numA = numA + fltAnswer
print (numA)

User Velixo
by
5.6k points

2 Answers

5 votes

Answer:

14.0

Step-by-step explanation:

Edge 2021

Question # 6 Math Formula What is the output of this program? Assume the user enters-example-1
User Panomosh
by
6.8k points
2 votes

Answer:

14.0

Step-by-step explanation:

The loop converts each answer to a float. The accumulator variable adds the values entered.

2.0 + 5.0 + 1.0 + 6.0 = 14.0

User Bravo
by
6.1k points