Here's the program. The program converts from Kilogram to Pounds and vice-versa.
pref = input("Hello, This is a program to convert 1. Mass, 2. Length, 3. Speed, 4. Temperature, 5. Currency and 6. Date \n Enter your option in NUMBER")
if pref == 1. or 1:
pref1 = input("1. Kg to lb \n 2. Lb to kgs")
if pref1 == 1:
Kgs = input("Enter weight in Kg")
Lbs = float(Kgs)*2.20462
print(str(Lbs))
elif pref1 == 2:
Lbs = input("Enter weight in lbs")
Kgs = float(Lbs)/2.20462
print(str(Kgs))
else:
exit()
However, it exits when I type a value into the program for the second time, i.e. when the program asks the user to enter their preference of whether they want to convert from Pound to Kilogram or vice-versa.\
Could someone please point out my mistake?