#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")
In questa pagina del sito puoi guardare il video online Python weight conversion exercise 🏋️ della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Bro Code 31 ottobre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 58,341 volte e gli è piaciuto 1.3 mille spettatori. Buona visione!