Question: need help writing a python program In this lab you will write a program that will do the following: - It will take as input

need help writing a python program need help writing a python program In this lab you will write

In this lab you will write a program that will do the following: - It will take as input the number of miles of taxi cab ride, after the prompt "Please input the number of miles for the ride: - it will calculate the cost by the following rules - there is a base charge of $2.50. --for the first 5 miles the charge is $4.00 per mile. For example if the distance is 3.5 miles the charge would be 2.50 3.5 4.00 = $16.00 for rides beyond the 5 miles up to 10 miles, the charge is $3.00 per mile beyond the 5 miles E.g. for a ride of 7 miles, the charge would be 2.50 +5* 4.00 + (7-5) 3.00 - $28.50 -For rides more beyond 10 miles, the charge for the miles beyond 10 miles is $2.00. For example for 20 miles the charge 2.50 +5 4.00 + (10.5) 3.00 + (20 - 10) 2.00 - $57.0 - The program should output the following with the correct charge: Please enter your input The charge for the ride is

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!