°o°>
\0/
O do you like my snow man
I want you to know that I’m never leaving cuz I’m mister snow to death we’ll be freezing so come on let’s go let’s go below zero and hide from the sun
In your example, you're asking the user for a number and then you're setting total and nums equal to zero. This results in your first number being ignored by the program. I included the complete working code below:
num = int(input("Enter a number: "))
total = num
nums = 1
while (total <= 100):
num = int(input("Enter a number: "))
nums = nums + 1
total = total + num
print("Sum: "+str(total))
print("Numbers Entered: "+str(nums))
I hope this helps!
Pwd
---------------------------------
Answer:
tempF = (tempC * 1.8) + 32;
Explanation:
Required
Correct the error in the program
The error is due to tempF not been initialized or being calculated
Correct the error by writing the formula for tempF before tempF was printed
<em>tempF = (tempC * 1.8) + 32;</em>
Writing the formula ensures that tempF is initialized with the expected equivalent value for tempC