PYTHON EXAMPLE · WORKING REFERENCE

Celsius to Fahrenheit

Temperature conversion formula use karke Celsius value ko Fahrenheit me convert karo.

Working code

celsius = 25
fahrenheit = (celsius * 9 / 5) + 32

print(fahrenheit)
Run Code ▶

Expected output

77.0

How it works

Celsius value ko 9 / 5 se multiply karke 32 add kiya jata hai. Result Fahrenheit temperature hai.

Try Yourself

celsius = 40
fahrenheit = (celsius * 9 / 5) + 32
print(fahrenheit)

Learn this concept

Read related Python Tutorial →