# 15, 16miles per galloon, convert to KM, how many KM to travel to use 32.62 gallons of gas
choice1 = input("Do you want to use 'KM' or 'Mi': "))    
choice1 = str(choice1)

# While loop

while True:
    
# if stateents    
    
if choice1 == 'KM' or choice1 == 'Km' or choice1 == 'km':
    Tvl = int(input("How many kilometers will you travel: "))
    MPG = int(input("How many kilometers per gallon does your car use: "))
    gas = int(input("How many kilometers away is the location "))
    break
elif choice1 == 'MI' or choice1 == 'Mi' or choice1 == 'mi':
    Tvl = int(input("How many miles will you travel: "))
    MPG = int(input("How many miles per gallon does your car use: "))
    gas = int(input("How many miles away is the location "))
    break
else:
    print("No proper distance chosen")
    
while True:
    
#if statement 2    
    
choice2 = str(input("Do you want to use 'L' or 'G': "))

if choice2 == 'L' or choice2 == 'l':
    print("L")
    break
elif choice2 == 'M' or choice2 == 'M':
    print("L")
    break
else:
    print("No proper unit given")

# misc questions

gas = int(input("How many gallons of gas is currently in your car: "))



Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: