You are driving a little too fast, and a police officer stops you. Write a function...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are driving a little too fast, and a police officer stops you. Write a function to determine what type of ticket you will get.**\n", This function has two parameters - X and is_birthday. X is the speed in mph and is_birthday is a boolean. Function has no return value, and prints the output in the function itself. "If your speed is 60 or less, the result is \"No Fine\". If speed is between 61 and 80 inclusive, the result is \"Small Fine\". If speed is 81 or more, the result is \"Large Fine\". Unless it is your birthday -- on your birthday, your speed can be 5 higher in all cases. The function prints one of 6 possible results: If it is not the driver's birthday and their speed was X "your speed was Xmph, you will get: No Fine (if speed is 60 or less) "\"your speed was Xmph, you will get: Small Fine\" (if speed is between 61 and 80 inclusive)\\\n", "\"your speed was Xmph, you will get: Large Fine\" (if speed is 81 or more)\n", "If it is the driver's birthday and their speed was X "Happy birthday, your speed was Xmph, you will get: No Fine" (if speed is 65 or less) "Happy birthday, your speed was Xmph, you will get: Small Fine" (if speed is between 66 and 85 inclusive) "Happy birthday, your speed was Xmph, you will get: Large Fine" (if speed is 86 or more) You are driving a little too fast, and a police officer stops you. Write a function to determine what type of ticket you will get.**\n", This function has two parameters - X and is_birthday. X is the speed in mph and is_birthday is a boolean. Function has no return value, and prints the output in the function itself. "If your speed is 60 or less, the result is \"No Fine\". If speed is between 61 and 80 inclusive, the result is \"Small Fine\". If speed is 81 or more, the result is \"Large Fine\". Unless it is your birthday -- on your birthday, your speed can be 5 higher in all cases. The function prints one of 6 possible results: If it is not the driver's birthday and their speed was X "your speed was Xmph, you will get: No Fine (if speed is 60 or less) "\"your speed was Xmph, you will get: Small Fine\" (if speed is between 61 and 80 inclusive)\\\n", "\"your speed was Xmph, you will get: Large Fine\" (if speed is 81 or more)\n", "If it is the driver's birthday and their speed was X "Happy birthday, your speed was Xmph, you will get: No Fine" (if speed is 65 or less) "Happy birthday, your speed was Xmph, you will get: Small Fine" (if speed is between 66 and 85 inclusive) "Happy birthday, your speed was Xmph, you will get: Large Fine" (if speed is 86 or more)
Expert Answer:
Answer rating: 100% (QA)
c are mainpy 1 def A NM N 00 0 2 3 4 5 6 7 8 9 PELANGGA ... View the full answer
Related Book For
Introduction to Probability
ISBN: 978-0716771098
1st edition
Authors: Mark Daniel Ward, Ellen Gundlach
Posted Date:
Students also viewed these programming questions
-
Mauro Products distributes a single product, a woven basket whose selling price is $24 per unit and whose variable expense is $20 per unit. The company's monthly fixed expense is $10,000. Required...
-
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...
-
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...
-
Bilge Pumpworks and Seaworthy Rope Company agreed to merge on January 1, 20X3. On the date of the merger agreement, the companies reported the following data: Bilge Pumpworks has 10,000 shares of its...
-
Explain how gains or losses on impaired assets should be reported in income.
-
Apply the minimization process to each machine in Table 7.4. Table 74 1 S653 00 6.52 s5 24 01 3 $2 0 0
-
In 1997, Bernard Bilski and Rand Warsaw filed a patent application for a method of hedging risk in the field of commodities trading. In effect, the asserted invention was a method of protecting...
-
Elkhorn College needs to keep better track of students and others who use the many computers available in the Buck Memorial Library. a. Design and draw a representation of a display screen for...
-
1. In the given reaction, XYZ3 2. 3. 4. 5. X+Y+3Z If one mole of each of X and Y with 0.05 mol of Z gives compound XYZ3. (Given: Atomic masses of X, Y and Z are 10, 20 and 30 amu, respectively.) The...
-
On January 1, 2014, Freeman Inc. purchased a new machine and financed this purchase by making a cash down payment of $30,000 and issuing a 12%, 5-year note that will be paid in semiannual installment...
-
Alicia and Bart are the sole shareholders of X Corporation, which is engaged in a financial services business. Alicia and Bart each own 50 shares of common stock. Alicia contributed a 453...
-
How can design consistency be useful in the setting of presentations of company products and branding to customers?
-
Assume you are a news anchor for a television channel presenting election results from different states or districts as well as tweets from your viewers. Would a linear or a nonlinear presentation be...
-
Students may well be asked to discuss their leisure pursuits during selection processes. Your task: Prepare a brief presentation about one of your leisure pursuits. Your purpose should be to...
-
Can knowing the source of information that you find online unfairly bias you against the information? Explain your answer.
-
What is visual literacy?
-
The mass of an atom of silver is 1.79 10 -22 g.How many atoms are in a 0.42 lb sample of silver?(Enter your answer in scientific notation as follows: 1.00E+2 isequivalent to 100). How do you solve?
-
What are the two components of a company's income tax provision? What does each component represent about a company's income tax provision?
-
Eighty-seven percent of people tear up when cutting an onion. People are selected randomly and independently to cut up an onion. What is the expected number of people who cut up an onion until you...
-
At a local store, there are 14 customers during a given evening. Each customer has an expected purchase of I $4.90, with a standard deviation of $1.50. If the customers' purchases are assumed to be...
-
On a certain radio station, 70% of the songs are rock songs, and 30% of the songs are pop songs. The songs are selected independently. Each "block" of songs (a "block" is a set of songs between...
-
Analysis of Canadian Manufacturing Workers Workhours. The time plot in Figure 18 . 22 describes the average annual number of weekly hours spent by Canadian manufacturing workers...
-
Souvenir Sales. The file SouvenirSales.csv contains monthly sales for a souvenir shop at a beach resort town in Queensland, Australia, between 1995 and 2001. [Source: Hyndman and Yang (2018).] Back...
-
Toys R US Revenues. Figure 18 . 23 is a time plot of the quarterly revenues of Toys R US between 1992 and 1995 (thanks to Chris Albright for suggesting the use of these data, which are available in...
Study smarter with the SolutionInn App