Back

Code Challenge: Celsius to Fahrenheit

Difficulty  

divider

Objective

Convert a temperature from Celsius to Fahrenheit based on user input.

Skills to Practice

  • Prompting a user for input
  • Saving user input to variables
  • Converting input to the correct data type
  • Performing arithmetic calculations
  • Formatting custom output using variables

Tasks

  • Create a new Python program named cc-celsius-to-fahrenheit.
  • Prompt the user to enter a temperature in Celsius.
  • Convert it to Fahrenheit. Formula: F = C × 1.8 + 32
  • Optionally, round the answer to two decimal places.
  • Display the result in a clear, formatted way.
  • If you want a degree symbol in your output, copy and paste this one: °

Sample Output

Sample Output
--- Celsius to Fahrenheit Calculator ---
Enter the temperature in Celsius: 62 [Enter]
62°C is equal to 143.6°F

Commence Challenge