Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 4: Fix the Errors The program below has 3 errors in it. Fix this program so that it runs without errors. When running it

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Exercise 4: Fix the Errors The program below has 3 errors in it. Fix this program so that it runs without errors. When running it will ask the user how many people are going to a theme park and for how many days. The program will then determine the total amount for the trip. There is a discount when the trip is planned over many days. For instance the price for 1 day is per day. For 2 days the price per day is . If the user wants to spend 3 days in the park the price is per day. Given the user has 4 people in their party and will be in the park 2 days, the program should print the following: Price per day: $35 Total for your trip: $280 Exercise 4: Fix the Errors To run your code line by line, click on the Code Visualizer. Code Visualizer Codio will test your program using 4 people and 2 days. The second test will use different data. Check 1 failed Output: File "Content/error4.py", line 10 if days =1 : SyntaxError: invalid syntax Expected: Enter the number of days you will be in the park: Enter the number of people in your party: Price per day: $35 Total for your trip: \$280 Feedback: Make sure you have identified and fixed all 3 errors. Check 2 failed Output: File "Content/error4.py", line 10 if days =1 : SyntaxError: invalid syntax Expected: Enter the number of days you will be in the park: Enter the number of people in your party: Price per day: $40 Total for your trip: \$200

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago