Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

Students also viewed these Databases questions

Question

Need help on answering the last three rows of A corporation.

Answered: 1 week ago

Question

How autonomous should the target be left after the merger deal?

Answered: 1 week ago