1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
EastWind [94]
3 years ago
9

Write a program that determine the admission price for a person to attend the sectionals game. Any day prior to game day, adult

tickets cost $10, and student tickets cost $6. On game day, the cost of each ticket goes up by $1. People with a coupon can get a discount. Anyone with coupon code CHS2021 gets a 5% discount, and anyone with coupon code CHSVIP gets a 10% discount. This program should have 3 functions:
askUser: This function asks the user all of the important questions (adult or student, game day or not, if they have a coupon or not and if so what the code is). This function takes in NO parameters and returns NO values. This function updates 4 global variables: status ("a" or "s" for adult or student), gameDay (True or False), hasCoupon (True or False), and coupCode ("CHS2021" or "CHSVIP").
getCost: This function takes in two parameters: string st (for status "a" or "s") and boolean gd (for game day True or False). Based on the inputted values, it calculates and returns one integer value, cost.
getDiscount: The function takes in two parameters: coup (coupon code, "CHS2021" or "CHSVIP" ) and c (cost). The function should only be called if hasCoupon is True. The function calculates and returns one decimal (float) value for the new discounted cost, discCost.

Example output:
Are you a student or adult (enter s or a)? a
Is this for a game today? no
Do you have a coupon? yes
What is the code? CHS2021
Your cost is: $9.5

Press enter to exit
Are you a student or adult (enter s or a)? s
Is this for a game today? yes
Do you have a coupon? no
Your cost is: $7.0

Press enter to exit

(Write Code In PYTHON)
Computers and Technology
1 answer:
DanielleElmas [232]3 years ago
8 0

Answer:

?

Explanation:

You might be interested in
What is an example of constructive criticism for an employee who is shy during meetings?
rewona [7]
<span>Speak up more so people don't think you're rude</span>
8 0
4 years ago
Read 2 more answers
The screened subnet protects the DMZ systems and information from outside threats by providing a network with intermediate secur
maks197457 [2]

Answer:swswsw

Explanation:swwsws

4 0
3 years ago
What is a characteristic ofa good cloud-based hosting?
Aliun [14]

Answer:

Explanation:

A good cloud-based hosting has many beneficial characteristics, some of which include on-demand self-service, broad network access, and being very elastic and scalable. These characteristics allow for a large number of users to benefit from the service at any time of the day and at a very fast speed due to the broad network access.

6 0
3 years ago
Because assembly language is so close in nature to machine language, it is referred to as a ____________.
Travka [436]

Answer:

low-level language.

Explanation:

6 0
4 years ago
Read 2 more answers
Newton's method has the advantage of having a faster quadratic convergence rate over the other methods such as Secant and bisect
zmey [24]

Answer:

a. True

Explanation:

The Newton's method (Newton-Raphson method) used in advanced statistical computing can be used for a continuous and differentiable function that can be approximated by a straight line tangent to it. It requires the derivative of the function to be known, Newton's method converges faster that is whenever it converges. Newton Raphson Method has quadratic convergence which is faster, and the quadratic convergence makes the error in the next iteration increase by the square of the value of the previous iteration.

3 0
3 years ago
Other questions:
  • Smartphones store their operating system software in ________.
    11·1 answer
  • A user receives a phone call from a person claiming to be from technical support. This person knows the users name and that the
    12·1 answer
  • A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
    9·1 answer
  • You have just built a new system from scratch. you turn the computer on but the system boot fails and sounds a beep code. what m
    15·1 answer
  • Minerals that contain the elements silicon and oxygen are called ______.
    7·1 answer
  • The algorithm ____ is used to find the elements in one range of elements that do not appear in another range of elements.
    5·1 answer
  • Describing Work Styles for Farmworkers and Laborers, Crop
    6·2 answers
  • Which of the following statements describes the general idea of an assistive media​
    7·1 answer
  • The formula in cell C9 is B9*F10. On copying this formula to cell Z9, what will be the formula​
    5·1 answer
  • Suppose Uber was considering a new algorithm to recommend ride destinations in the app. Which type of research strategy should t
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!