Python Program to write Taxi Program Logic.
How does this program work?
- This code helps to how to write Taxi Program logic.
Here is the code
print("1-> AP05 AE 8887")
print("2-> AP05 CK 9875")
print("3-> AP05 CY 2468")
c=int(input("Choose Your Car Number: "))
if c==1:
t = int(input("Enter the count of the trips: "))
s = int(input("Enter the starting Kilometers of the day started: "))
e = int(input("Enter the Ending Kilometers of the day ended: "))
d=e-s
print("Your Car Number is AP05 AE 8887")
print("Total trips count:", t)
print("Total Kilometers Driven today is:", d)
print("Income per each kilometer: ₹ 8")
to = 8 * d
print("Total Income:", to)
elif c==2:
t = int(input("Enter the count of the trips: "))
s = int(input("Enter the starting Kilometers of the day started: "))
e = int(input("Enter the Ending Kilometers of the day ended: "))
d = e - s
print("Your Car Number is AP05 AR 9875")
print("Total trips count:", t)
print("Total Kilometers Driven today is:", d)
print("Income per each kilometer: ₹ 8")
to = 8 * d
print("Total Income:", to)
elif c==3:
t = int(input("Enter the count of the trips: "))
s = int(input("Enter the starting Kilometers of the day started: "))
e = int(input("Enter the Ending Kilometers of the day ended: "))
d = e - s
print("Your Car Number is AP05 CY 2468")
print("Total trips count:", t)
print("Total Kilometers Driven today is:", d)
print("Income per each kilometer: ₹ 8")
to = 8 * d
print("Total Income:", to)
else:
print("Wrong Input")