-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSpeed.py
34 lines (28 loc) · 1.14 KB
/
Speed.py
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
31
32
33
34
#A simple Program that calculates the Speed, Distance and Time!
print("This is a simple Program that calculates the Speed, Distance and Time!")
triangle=input("Please choose a number to find out: 1. Speed 2. Distance 3. Time")
if triangle == "1":
print("We will find the Speed")
distance1=(float(input("Please enter the distance in Metres")))
time1=(float(input("Please enter the time in seconds")))
print("The speed will be in m/s")
answer1 = distance1/time1
print (answer1)
elif triangle == "2":
print("We will find the Distance")
speed2=(float(input("Please enter the the Speed in m/s")))
time2=(float(input("Please enter the time in Seconds")))
print("The distance will be in Metres")
answer2 = speed2*time2
print (answer2)
elif triangle == "3":
print("We will find the Time")
speed3=(float(input("Please enter the the Speed in m/s")))
distance3=(float(input("Please enter the distance in Metres")))
print("The time will be in Seconds")
answer3 = distance3/speed3
print (answer3)
else:
print("ERROR")
print("Thanks for using this program")
end=input("End Of Program.....")