Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- print ("What would you like to calculate?")
- print ("1. Reaction Distance")
- print ("2. Breaking Distance")
- print ("3. Stop Distance")
- A = raw_input('Chose your answer by typing "Reaction", "Break", "Stop" or "Quit" to exit: ')
- if A == "Reaction" or A == "reaction":
- Speed = raw_input("Enter speed: ")
- reactionS = raw_input("Enter the reacion time in seconds: ")
- svar = (int(Speed) * int(reactionS)) / 3.6
- print ("The breaking distance is: " + str(svar))
- elif A == "Break" or A == "break":
- print("Breaking Distance")
- elif A == "Stop" or A == "stop":
- print("Stop")
- else:
- quit()
Advertisement
Add Comment
Please, Sign In to add comment