Challenge: Temperature Conversion

Test yourself and implement what you have learned so far in this challenge.

Problem Statement

You are given a variable fahrenheit which stores a temperature in degrees Fahrenheit. You have to create a variable celsius which converts the temperature stored in fahrenheit to degrees Celsius.

To convert temperature from degrees Fahrenheit to degrees Celsius, you first need to subtract the temperature by 32 and then multiply it by 5 divided by 9.


The input is the variable fahrenheit.

fahrenheit has already been declared for you.


The output will be the value assigned to Celsius.

Sample Input


Sample Output


Test Yourself

Write your code in the given area. Try the exercise by yourself first, but if you get stuck, the solution has been provided. Good luck!

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy