Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Python temperature conversion program ๐ŸŒก๏ธ
Play lesson

Python tutorial for beginners ๐Ÿ - Python temperature conversion program ๐ŸŒก๏ธ

4.0 (0)
8 learners

What you'll learn

This course includes

  • 14.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#python #practice #exercises unit = input("Is this temperature in Celsius or Fahrenheit (C/F): ") temp = float(input("Enter the temperature: ")) if unit == "C": temp = round((9 * temp) / 5 + 32, 1) print(f"The temperature in Fahrenheit is: {temp}ยฐF") elif unit == "F": temp = round((temp - 32) * 5 / 9, 1) print(f"The temperature in Celsius is: {temp}ยฐC") else: print(f"{unit} is an invalid unit of measurement")

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere