Computers and Technology, 10.10.2020 18:01 lilianjoyful
CODE IN PYTHON:
Your task is to write a simple program that would allow a user to compute the cost of a road trip with a car. User will enter the total distance to be traveled in miles along with the miles per gallon (MPG) information of the car he drives and the per gallon cost of gas. Using these 3 pieces of information you can compute the gas cost of the trip.
User will also enter the number of days it will take to complete the trip. For each night (day-1 nights), user will need a hotel. We will ask for the number of stars for the hotel the user wants to stay. 5 star hotel costs $250 per night. 4 star hotel costs $180 per night. 3 star hotel costs $120 per night, 2 star hotel costs $100 per night and finally 1 star hotel costs $50 per night. Using the hotel costs and the number of nights users will need to stay at a hotel, you can compute the hotel cost of the trip.
Please note that 5 star and 4 star hotels give 10% discount if the user will be staying more than 2 nights -- (these are chain hotels, so even if you are staying at different locations discount apply).
We should also account for the cost of meals. This depends on the type of hotel the user is staying. In general, we take 20% of hotel cost as the meal cost (after 10% hotel discount if applicable).
Example Run #1
Distance: 350
MPG : 15
Gas Price: 3.79
Days Traveling : 3
Hotel Stars (1-5) : 3
Your total cost is $376.43333333333334
Example Run #2
Distance: 400
MPG : 20
Gas Price: 2.99
Days Traveling: 1
Hotel Stars (1-5): 5
Your total cost is $59.800000000000004.
Example Run #3
Distance: 150 MPG : 25 Gas Price: 1.99 Days Traveling : 2 Hotel Stars (1-5): 5 Your total cost is $311.94.
Answers: 3
Computers and Technology, 22.06.2019 12:30
What characteristic of long period comets suggest they come directly from the oort cloud?
Answers: 2
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
Computers and Technology, 23.06.2019 09:00
What provides an array of buttons for quick access to commonly used commands and tools
Answers: 1
Computers and Technology, 23.06.2019 18:30
Report all segments of identity by descent longer than 20 polymorphisms between pairs of individuals in the following cohort of 15 individuals across 49 polymorphisms: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 numeric input 2 points possible (graded) you have 2 attempts to complete the assignment below. for example if the sequence is "bcd", which occurs in "abcdef" , the starting point would be 2 (b), and the finishing point would be 4(d). individuals 7,10 between positions
Answers: 1
CODE IN PYTHON:
Your task is to write a simple program that would allow a user to compute the cost...
Mathematics, 09.11.2020 21:20
Arts, 09.11.2020 21:20
Mathematics, 09.11.2020 21:20
Mathematics, 09.11.2020 21:20
Chemistry, 09.11.2020 21:30
Business, 09.11.2020 21:30
Spanish, 09.11.2020 21:30
Computers and Technology, 09.11.2020 21:30
Health, 09.11.2020 21:30
English, 09.11.2020 21:30