print "----welcome----" capacity = input ("please enter the capacity of the fuel tank in gallons, gallons must be between 6 & 20:") while capacity < 6 or capacity > 20: capacity = input ("sorry invalid number,please enter gallons between 6 & 20:") efficiency = input ("please enter the fuel efficiency in MPG, efficiency must be between 20 & 75:") while efficiency < 20 or efficiency > 75: efficiency = input("sorry invalid number,please enter MPG between 20 & 75:") pricepergallon=input ("price per gallon of petrol? £, price must be between £3.20&4.20:") while pricepergallon < 3.20 or pricepergallon > 4.20: pricepergallon= input ("sorry invallid price,please enter price between £3.20 & £4.20:") carcango= capacity * efficiency print " on a full tank, the car can travel" ,carcango, "miles" print "the cost of travelling 100 miles is £", (100.0/efficiency *pricepergallon) print "end of program"