Skip to content

Instantly share code, notes, and snippets.

@Manuela82
Created November 14, 2017 17:12
Show Gist options
  • Save Manuela82/088c74c5571425cf9ac77ce194c007bf to your computer and use it in GitHub Desktop.
Save Manuela82/088c74c5571425cf9ac77ce194c007bf to your computer and use it in GitHub Desktop.
converter
print "Hello, I'm converting kilometers into miles.\n"
kilometres = raw_input("Please enter the amount of kilometres: ")
miles = float(kilometres) * 0.621372
print miles
answer = raw_input("Do you want to do another conversion? ")
while answer == "yes":
kilometres = raw_input("Please enter the amount of kilometres: ")
miles = float(kilometres) * 0.621372
print miles
answer = raw_input("Do you want to do another conversion? ")
if answer == "yes":
print miles
else:
print "Goodbye!!!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment