Skip to content

Instantly share code, notes, and snippets.

@daniel-obrien
Created October 31, 2016 21:20
Show Gist options
  • Save daniel-obrien/e508f02962ce7fecb013fc97cea89bb8 to your computer and use it in GitHub Desktop.
Save daniel-obrien/e508f02962ce7fecb013fc97cea89bb8 to your computer and use it in GitHub Desktop.
Ruler Distance
while True:
ruler = 0.3
earth = 40000000
print("Welcome to the Distance to Ruler distance converter")
print("Enter any distance in metres and I will give you how many 30cm ruler it measures")
distance=int(input("Please enter the distance you would like to convert in meteres"))
answer=(distance/ruler)
answer2 = (distance/earth)
answer2 = (answer2*100)
print(answer)
print(answer2)
print("The Second number is a percentage of the world's circumfrence the distance you entered is")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment