Write a shell (text-based) program, called ticket_price.py, that prompts the user for their age and, depending...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a shell (text-based) program, called ticket_price.py, that prompts the user for their age and, depending on the user's response, prints out 1 of the 3 sentences below. • Children 5 and under are free, so your price is $0. • Seniors 60 and over are 1/2 off, so your price is $10. • Your price is $20. Below is an example of a 15 year old using the program. PS C:\Users\ssiva\Desktop> python ticket price.py What is your age? 15 Your price is $20. PS C:\Users\ssiva\Desktop> Ⓒ Write a shell (text-based) program, called ticket_price.py, that prompts the user for their age and, depending on the user's response, prints out 1 of the 3 sentences below. • Children 5 and under are free, so your price is $0. • Seniors 60 and over are 1/2 off, so your price is $10. • Your price is $20. Below is an example of a 15 year old using the program. PS C:\Users\ssiva\Desktop> python ticket price.py What is your age? 15 Your price is $20. PS C:\Users\ssiva\Desktop> Ⓒ
Expert Answer:
Answer rating: 100% (QA)
Python program called ticketpricepy to prompt the user fo... View the full answer
Related Book For
Applied Regression Analysis and Other Multivariable Methods
ISBN: 978-1285051086
5th edition
Authors: David G. Kleinbaum, Lawrence L. Kupper, Azhar Nizam, Eli S. Rosenberg
Posted Date:
Students also viewed these programming questions
-
A company uses an item of inventory as follows Purchase price Annual demand Ordering cost Annual holding cost $96 per unit 4,000 units $300 10% of purchase price Economic order quality 500 units...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
9.1 Exercise (JDK Source Code): Extract the source code of the class Math from the JDK source code ("$JAVA_HOME" "src.zip" "Math.java" under folder "java.lang"). Study how constants such as E and...
-
Sewing industries is a factory located in Divundu that specialises in assembling mini-sewing electrical machines which are portable and which can be used in close proximity. The business has provided...
-
The nuclei involved in the nuclear reaction A1 + A2 A3 + A4 have the binding energies E1, E2, E3, and E4. Find the energy of this reaction.
-
them? What are the objectives of micromotion study? What are "Therbligs" and how do we use Discuss Cyclegraph and Chronocyclegraph. O What is Simo-chart? Explain with example.
-
Consider a $2^{3}$ experiment with factors A, B, and C. Show that \[\begin{aligned}I N T(A, B, C) & =\frac{1}{2}[I N T(A, C \mid B+)-I N T(A, C \mid B-)] \\& =\frac{1}{2}[I N T(C, B \mid A+)-I N T(C,...
-
One observer argues that external equity should always be the primary concern in compensation, noting that it attracts the best employees and prevents the top performers from leaving.
-
Soarch Fila Home Insert Draw Design Transitions Animations Slide Show Record Review View Help Layout R New AAA E-E-3 JUS+AV Ax LA OOO\\ ALLOCG Record Share Shape F- Ind Stace Ouding Aange Cuck...
-
PART-4 PART-5 PART-6 Jaguar Plastics Company has been operating for three years. At December 31 of last year, the accounting records reflected the following: Cash Investments (short-term) Accounts...
-
6. The dry unit weight of a sand sample is 103 pounds per cubic foot and the specific gravity of soll grains is 2.68. What is the unit weight of the sand sample when saturated?
-
Which is the first line containing a compiler error? A. x1 B. x2 C. x3 D. None of the above var title="Weather"; // line x1 var hot 100, var cold = 20; // line x2 = var f = 32, int c = 0; // line x3
-
Which statement about the following interface is correct? A. The code compiles without issue. B. The code does not compile because of line k1. C. The code does not compile because of line k2. D. The...
-
Given the following method, what is the first line that does not compile? A. k1 B. k2 C. k3 D. k4 E. k5 public static void main(String[] args) { int Integer } 0; Integer int= 0; Integer ++; int++;...
-
Which statement about the following program is correct? (Choose two.) A. The code does not compile because of line u1. B. The code does not compile because of line u2. C. The code does not compile...
-
Which statements can accurately fill in the blanks in this table? (Choose two.) A. Blank 1: an instance method only B. Blank 1: a static method only C. Blank 1: an instance or static method D. Blank...
-
Suppose that Bosa Co., a U.S.-based MNC, has been offered a project by the government of Brazil. The project lasts for a period of one year and would require a 1,000,000 Brazilian real (R) investment...
-
The slopes of the tangents at the points where the curve y = x2 - 4x intersects the X-axis is 1) 1 2) +2 3) +3 4) +4
-
Suppose that, for each of three age groups (25-34, 35-44, and 45-54), we have recorded yearly sex-specific lung cancer mortality rates for the five-year period 19! through 1994. These data are to be...
-
Suppose that the weight W of male patients registered at a diet clinic has the normal distribution with mean 190 and variance 100. a. For a random sample of patients of size n = 25, the expression P(...
-
A university admissions officer regularly administers a test to all entering freshmen. A new version of the test is marketed by the testing company. To evaluate the new form, the admissions officer...
-
Write a numerical algorithm to solve Eq. 8.71 for \(A_{n}\). Obtain lift coefficients for \(h / 2 b=2\) and \(\mathrm{AR}=6,10\) at \(\mathrm{AoA}=12\). Eq. 8.71 Asin no 1 (y) 1 ban b 4h2b2 (cos...
-
Using (8.76) find the chord wise variation of the lift as \(L^{\prime}(x)\). Eq 8.76 1 za 2hg ax ax ax - (x)- aza
-
Why are none of the bulbs in Figure 31. 24 lit? Data from Figure 31. 24 Figure 31.24 (1) (iii) NNN
Study smarter with the SolutionInn App