4. Implement a function ticketPrice (). The function asks the user to specify their name and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
4. Implement a function ticketPrice (). The function asks the user to specify their name and age. The program will decide how much a ticket cost for a person. If the person is 13 or over the cost of the ticket is $30. If they are under 13, the cost is $15. The screenshot below illustrates the behavior. ticketPrice () Please enter your name: Tony Please enter your age: 99 Tony the price of your ticket is $ 30. ticket Price () Please enter your name: Sofia Please enter your age: 12 Sofia the price of your ticket is $15. ticketPrice () Please enter your name: Dominik Please enter your age: 13 Dominik the price of your ticket is $ 30 . 4. Implement a function ticketPrice (). The function asks the user to specify their name and age. The program will decide how much a ticket cost for a person. If the person is 13 or over the cost of the ticket is $30. If they are under 13, the cost is $15. The screenshot below illustrates the behavior. ticketPrice () Please enter your name: Tony Please enter your age: 99 Tony the price of your ticket is $ 30. ticket Price () Please enter your name: Sofia Please enter your age: 12 Sofia the price of your ticket is $15. ticketPrice () Please enter your name: Dominik Please enter your age: 13 Dominik the price of your ticket is $ 30 .
Expert Answer:
Answer rating: 100% (QA)
You can implement the ticketPrice function in Python to achieve the d... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
How do business process reengineering initiatives cause radical changes in the way firms execute processes? How are competitive forces driving decisions to downsize and restructure operations? In...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Write statements that can be used in a JavaFX application to draw the five interlocking rings that are the symbol of the Olympics. (Dont worry about the color.)
-
How many frames per second can gigabit Ethernet handle? Think carefully and take into account all the relevant cases. Hint: the fact that it is gigabit Ethernet matters.
-
Express the statement "There is exactly one student in this class who has taken exactly one mathematics class at this school" using the uniqueness quantifier. Then express this statement using...
-
Describe an experiment, and give the necessary equations for measurement of the complex Young's modulus, \(E_{\mathrm{m}}^{*}\), of an isotropic matrix material.
-
During the preparation of the bank reconciliation for Regal Concepts Co., Misty Watts, the assistant controller, discovered that Windsor National Bank incorrectly recorded a $15,750 check written by...
-
4. Write the definitions for engineering stress, true stress, engineering strain, and true strain for loading along a single axis. A commercially pure copper wire originally 10.00 m long is pulled...
-
The Morton Ward Company is considering the introduction of a new product that is believed to have a 50-50 chance of being successful. One option is to try out the product in a test market, at an...
-
What are all the possible rational rational zeros of the following function? f(x) = 2x9 - 7x6+3x2-x+8 Hint, you are looking for all possible rational zeros. Not factoring.
-
Why is it important for HR and compensation professionals to learn about compensation practices in other parts of the world? Include a rationale for your answer.
-
How would you design a compensation/benefits program to appeal to generational differences in the workplace? How would you design a rewards program to appeal to generational differences in the...
-
If you were the administrator of a small (150-200 bed) skilled nursing home what are some things that you would do to create a culture of safety and quality.
-
Effective human resource management and organizational behavior as they relate to both Fair treatment and legal compliance
-
Which qualitative and quantitative metrics would be recommended to evaluate compensation initiatives at an organization like Walmart?
-
The effective resistance of a 3 phase, Y - connected 50 Hz, 2200 V synchronous generator is 0.5 per phase. On short circuit a field current of 40 A gives the full load current of 200 A. An emf (line...
-
Synthesize the products by drawing out reagents and intermediates along the way. `N H. OH HO HO
-
Janie graduates from high school in 2012 and enrolls in college in the fall. Her parents pay $4,000 for her tuition and fees. a. Assuming Janie's parents have AGI of $170,000, what is the American...
-
Diego, age 28, married Dolores, age 27, in 2012. Their salaries for the year amounted to $46,479 and they had interest income of $3,500. Diego and Dolores' deductions for adjusted gross income...
-
Ann hires a nanny to watch her two children while she works at a local hospital. She pays the 19-year-old nanny $125 per week for 48 weeks during the current year. a. What is the employer's portion...
-
At 30 June 2024, the accountant for Woodbine Construction, Mary Ellam, is preparing the financial statements for the year ended on that date. To calculate the annual leave payable, the accountant had...
-
How would each of the following liabilities be classified (current, non-current, or both) at the end of the financial year? Unearned revenue Accrued expenses Provision for warranty repair costs...
-
The following were among transactions of Everluck Enterprises Ltd during the financial years ending 30 June 2023 and 30 June 2024. Required Record in general journal form all the above transactions,...
Study smarter with the SolutionInn App