The Formula
Convert between them.
The Magic Formula 🪄
Hello again, temperature wizard! 🧙 Today we learn the secret spell to turn Celsius into Fahrenheit and back!
It is just a tiny bit of math. Don't worry, Python does the hard part! 🤖
print("Let's cast the temperature spell! 🪄")Celsius to Fahrenheit ➡️
To go from Celsius to Fahrenheit, the spell is:
F = C × 9 / 5 + 32
Multiply by 9, divide by 5, then add 32. Let's try it! ✨
c = 20
f = c * 9 / 5 + 32
print(c, "Celsius is", f, "Fahrenheit 🔥")