Question: what is the python coding for this problem: Write a program, using Object-Oriented Programming, to compute a taxi fare. In some cities, taxi fares are

what is the python coding for this problem:

Write a program, using Object-Oriented Programming, to compute a taxi fare. In some cities, taxi fares are calculated based on start and end zones plus a per-minute charge. In this city, there are three zones (1, 2, and 3) and a graduated scale for time. The program should have a function that computes the taxi fare. The function should receive three parameters: the starting zone, the ending zone, and the time of the ride. It should return the total fare for the ride. Use the following table for your calculations:

Start zone

End zone

Base charge

1

1

$5.00

1

2

$7.00

1

3

$8.00

2

1

$7.00

2

2

$5.00

2

3

$9.00

3

1

$8.00

3

2

$9.00

3

3

$5.00

Time is more than

But is not over

Charge

0 minutes

4 minutes

$0.75 per minute

4 minutes

10 minutes

$3.00 plus $0.50 per minute over 4 minutes

10 minutes

20 minutes

$6.00 plus $0.40 per minute over 10 minutes

20 minutes

No limit

$10.00 plus $0.30 per minute over 20 minutes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!