Answer to Question #173191 in Python for Angelie Suarez

Question #173191

Create a program that will accept number of passengers and distance from point of origin to destination. Calculate the expense of the passenger if the fare is P20.00 per kilometer.


sample output:

passenger count: 5

distance :2

total fare is : P200.00


1
Expert's answer
2021-03-19T00:31:22-0400
pass_count = int(input("Enter the number of passengers: "))
dis = int(input("Enter the distance: "))
fare_per_km = 20.00
total_fare = (dis * fare_per_km) * pass_count
print("Total Fare:", total_fare)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS