Question: Create the Road Trip solution you created in Lab 1 as a python program called road _ trip.py . Use the same values and algorithms

Create the Road Trip solution you created in Lab 1 as a python program called road_trip.py. Use the same values and algorithms from Lab 1. Prompt the user for three integers as: maximum miles per day, average speed (mph), and distance between 15-minute break waypoints. Calculate the total travel hours per day and total driving hours for each of the five trips depicted below. Use print with formatting (f-strings) to match the output. Enter the maximum miles per day:
800
Enter the average speed (mph):
70
Enter miles driven before 15 minute break:
200
Total travel hours per day: 12.4
Trip Miles Hours
=====================================
Dallas to New York 155724.2
Dallas to Los Angeles 143622.3
Dallas to Chicago 96815.0
Dallas to Houston 2403.7
Dallas to Anchorage 388760.4
4)[30 points] Income by City
Create the Income by City calculations you developed in Lab 1 as a Python program called
income_by_city.py. You will prompt the user to enter the annual income for Dallas. Calculate the
equivalent income for the eight cities listed using the adjustment percentages provided. Format the
output so the data aligns in three columns as shown in the sample output below (Hint: use f-strings).
Sample run: (highlighted text indicates data entered by user at runtime.)
Enter annual income - Dallas: $ 100000
Location Adjustment Equivalent Income
=============================================
New York 34% $134,000.00
Los Angeles 20% $120,000.00
Chicago 11% $111,000.00
Minneapolis 6% $106,000.00
Houston 1% $101,000.00
Memphis -1% $99,000.00
San Antonio -3% $97,000.00
Toledo -5% $95,000.00

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!