Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP Lab 4 Lab 4 In this lab you will write a program that will do the following - It will take as input

image text in transcribed

PLEASE HELP

Lab 4 Lab 4 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 250 + 35 * 4.00 = $16.50 --for rides beyond the 5 miles up to 10 miles, the charge is $3.00 per mile beyond the 5 miles. Eg 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 is 2.50 +5 * 4.00 + (10-5) * 3.00 + (20 - 10) * 2.00 = $57.50 - The program should output the following with the correct charge Please enter your input The charge for the ride is - You must include an appropriate header in the source code in the format of previous labs. You must upload the file with the source python code lab4.py, and screenshots with inputs 6, 11, 17, and 21 You must turn in hard copies of the above as well Deadline: 10 am, Tuesday February 4. Blackboard will not accept late submissions

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 Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

7. Identify six intercultural communication dialectics.

Answered: 1 week ago