Python weight conversion exercise 🏋️

Published: 31 October 2022
on channel: Bro Code
58,341
1.3k

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


On this page of the site you can watch the video online Python weight conversion exercise 🏋️ with a duration of hours minute second in good quality, which was uploaded by the user Bro Code 31 October 2022, share the link with friends and acquaintances, this video has already been watched 58,341 times on youtube and it was liked by 1.3 thousand viewers. Enjoy your viewing!