Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Python weight conversion exercise ๐Ÿ‹๏ธ
Play lesson

Python tutorial for beginners ๐Ÿ - Python weight conversion exercise ๐Ÿ‹๏ธ

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 #course #tutorial Python exercises for beginners # Python weight converter weight = float(input("Enter your weight: ")) unit = input("Kilograms or Pounds? (K or L): ") if unit == "K": weight = weight * 2.205 unit = "Lbs." print(f"Your weight is: {round(weight, 1)} {unit}") elif unit == "L": weight = weight / 2.205 unit = "Kgs." print(f"Your weight is: {round(weight, 1)} {unit}") else: print(f"{unit} was not valid")

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