Python weight conversion exercise 🏋️

Publicado em: 31 Outubro 2022
no canal de: 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")


Nesta página do site você pode assistir ao vídeo on-line Python weight conversion exercise 🏋️ duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Bro Code 31 Outubro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 58,341 vezes e gostou 1.3 mil espectadores. Boa visualização!