Accept the temperature in Fahrenheit and check whether the water is boiling

In this python if else program, accept the temperature in Fahrenheit and check whether the water is boiling or not.

To convert temperatures in degrees Fahrenheit to Celsius, subtract 32 and multiply by .5556 (or 5/9). To convert temperatures in degrees Celsius to Fahrenheit, multiply by 1.8 (or 9/5) and add 32.

Steps to solve the program
  1. Take the temperature in Fahrenheit as input through the user.
  2. The boiling temperature of water in Fahrenheit is 212.
  3. Using an if-else statement check whether the input temperature is equal to 212.
  4. Print the respective output.
				
					temp = int(input("Enter temperature of water in Fahrenheit: "))

if temp != 212:
    print("Water is not boiling")
else:
    print("Water is boiling")
				
			

Output :

				
					Enter temperature of water in Fahrenheit: 190
Water is not boiling
				
			

Related Articles

find the lowest number between three numbers.

accept two numbers and mathematical operations from users 

Leave a Comment