-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpeed.py
More file actions
30 lines (29 loc) · 1.36 KB
/
Speed.py
File metadata and controls
30 lines (29 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
This program has the user input the speed and terrain of
which they are on and gives a unique output to each
Author: Jacob Olshanskiy
Date: 3-17-22
"""
vehicle = eval(input("How fast is your vehicle driving in the unit miles per hour?"))
area = input("What terrain is your vehicle driving on (Freeway, Main Road, Residential Street)")
if vehicle > 65:
if area =="Freeway" or area == "freeway":
print("Thank you! Have a safe drive")
elif area == "Main Road" or area == "main road":
print("Consider slowing down the vehicle")
elif area == "Residential Street" or area == "residential street":
print("Slow down vehicle immediately")
elif 45 < vehicle < 64.9:
if area =="Freeway" or area == "freeway":
print("Consider increasing speed on vehicle")
elif area == "Main Road" or area == "main road":
print("Thank you! Have a safe drive")
elif area == "Residential Street" or area == "residential street":
print("Slow down vehicle immediately")
elif 0 < vehicle < 44.9:
if area == "Freeway" or area == "freeway":
print("Increase speed of vehicle immediately")
elif area == "Main Road" or area == "main road":
print("Consider increasing speed on vehicle")
elif area == "Residential Street" or area == "residential street":
print("Thank you! Have a nice day")