tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code04:01

Python weight conversion exercise 🏋️

Bro Code ↗

From the creator

#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")

Published 2022-10-31 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code