unit converter
hi,guys here is my code: print "Hello! This is a unit converter between km and miles." km = " " miles = " " response = input('Enter km or miles: ') if response is 'km': print "Please enter a number of kilometers that you'd like " \ "to convert into miles. Enter only a number!" km = float(raw_input("Kilometers: ")) km = miles * 1.609 print "{0} kilometers is {1} miles.".format(km, miles) else: print "Please enter a number of miles that you'd like " \ "to convert into kilometers. Enter only a number!" miles = float(raw_input("Miles: ")) miles = km * 0.621 print "{0} miles is {1} kilometers.".format(miles,km) on two lines: km = miles * 1.609 and miles = km * 0.621 I got an error: TypeError: can't multiply sequence by non-int of type 'float' Also can you give me some directions for writing better codes. Thank you very much!!!