Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Big Data With Hadoop MapReduce A Classroom Approach

Authors: Rathinaraja Jeyaraj ,Ganeshkumar Pugalendhi ,Anand Paul

1st Edition

1774634848, 978-1774634844

More Books

Students also viewed these Databases questions