You are planning an outing with some friends and need to calculate the total price of the tickets. A regular ticket usually costs $3.99 and a stu- dent ticket costs only $2.99. If the total number of tickets being ordered (including both students and regular tickets) is at least 10, then a 10% discount is applied to the order. However, if it is a holiday, then the at-least-ten group discount is only 5% (not 10%). Write a program that takes three lines of input: the number of reg- ular tickets, the number of student tickets, and an integer indicating whether it is a holiday (1) or not (0). It prints a float giving the total cost. Be sure to define and use constants for REGULAR TICKET PRICE and STUDENT TICKET PRICE. Write your program in a file named tickets.py.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
icon
Related questions
Question

[PYTHON LANGUAGE]

You are planning an outing with some friends and need to calculate the total price of the tickets. A regular ticket usually costs $3.99 and a stu- dent ticket costs only $2.99. If the total number of tickets being ordered (including both students and regular tickets) is at least 10, then a 10% discount is applied to the order. However, if it is a holiday, then the at-least-ten group discount is only 5% (not 10%).

Write a program that takes three lines of input: the number of reg- ular tickets, the number of student tickets, and an integer indicating whether it is a holiday (1) or not (0). It prints a float giving the total cost. Be sure to define and use constants for REGULAR TICKET PRICE and STUDENT TICKET PRICE. Write your program in a file named tickets.py.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Topological Sort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning