Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program in Python that will allow the user to calculate the total cost of a ski lift ticket. Most ski hills offer tickets

Create a program in Python that will allow the user to calculate the total cost of a ski lift ticket. Most ski hills offer tickets based on age. Full day ski lift tickets allow the skier to use the lifts from 9:00 AM to 4:30 pm. For skiers 7 and under their ticket is free. Skiers who are 8 years old to 13 years old the ticket is $35. Skiers who are between the ages of 14 and 17 pay $45. Skiers between 18 and 70 will pay $55 per day. Finally those skiers 71 and older will pay nothing.

Many ski hills offer night skiing as well. For those that have purchased a day ticket, night skiing will only cost them $20. This fee does not apply to those who are 7 and under or 71 and older. Their tickets, not matter if they ski during the day or night, is still free.

Your program needs to ask the user for their age and if they want to ski at night. The program will determine the cost of one ticket and print that out to the user.

Your input statements should look like the following:

Enter your age: Do you want to night ski? Enter yes or no:

If the user enters 16 as their age and no for night skiing, your should look like the following:

Your lift ticket will cost you: $45

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899