49.1k views
3 votes
Write an if/else statement that assigns 1 to the variable fever if the variable temperature is greater than 98.6; otherwise it assigns 0 to fever.

User TheDiveO
by
4.7k points

1 Answer

7 votes

Answer:

temperature = int(float(input("Enter temperature: ")))

fever = 0

if temperature > 98.6:

fever +=1

else:

fever = 0

print(fever)

Step-by-step explanation:

User MandyK
by
4.1k points