if elif else

Run Settings
LanguagePython
Language Version
Run Command
age = int(input("Enter your age: ")) if age >= 18: print ("You are over 18") elif age <0: print ("you have not born yet") elif age >=100: print("You are overaged") else: print("you must be 18+ to sign up") weight = float(input("enter your weight")) Unit - input("Kilo or pounds? (K or L):") if Unit == "K": weight = weight * 2.205 unit ="Lbs" print (f"Your weight is: {weight}{Unit}") elif Unit == "L": weight = weight/2.205 unit = "Kg" print (f"Your weight is: {weight}{Unit}") else: print (f"{Unit} is not valid")
Editor Settings
Theme
Key bindings
Full width
Lines