Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

you should use python and wing101 a) Write a program to calculate the fine a driver has to pay based on the amount the driver

you should use python and wing101
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
a) Write a program to calculate the fine a driver has to pay based on the amount the driver is speeding. This will be calculated using the speed limit and the driver's actual speed. If a driver is not speeding, there are two outcomes. If a driver is driving 11 KM or more under the speed limit, they are driving too slowly and considered unsafe. If a driver is driving up to 10 KM under the speed limit or exactly at the speed limit, then they are driving safely, If the driver exceeds the speed limit, the amount of the ticket is calculated sto the following table: Amount of fine KM over the speed limit 1 to 15 $100 + ($5 *amt of Korea Select del prog 16 to 30 $75 +($3 *amt of KMs I limit) speed limit) $125+ ($10 amt of KMs over speed limit) $235 +($15* KMs over speed limit) 31 to 50 * Over 50 to Academ There are two complications: Edmonton recently changed the speed limit to 40 KM. If the driver's speed is between 1 and 15 KM over the speed limit and the speed limit is 40 KM, the driver will receive a than 50 KM above the speed limit and they have previous speeding tickets, then they will have their license suspended for one month instead of paying a fine. If the driver's speed instead of a fine. VOOR Too shis a a) What is the speed limit? 50 b) What speed were you travelling? 30 SO unsafe out Driving 20 KM below the limit is unsafe. a) What is the speed limit? 100 b) What speed were you travelling? 100 Not speeding You were driving safely. Well done! 3 Speeding by 1-15 KM and limit IS 40 KM a) What is the speed limit? 40 b) What speed were you travelling? 45 You were driving 45 KM in a 40 KM zone. Your speed was 5 KM over the limit. Edmonton residential speed limits are now 40 KM. This is a warning. Drive safely! Speeding by 1 - 15 KM and limit is a) What is the speed limit? 75 b) What speed were you travelling? 90 You were driving 90 KM in a 75 KM zone. erty a 1 - 15 KM and limit Is 40 KM You were driving 45 KM in a 40 KM zone. Your speed was 5 KM over the limit. Edmonton residential speed limits are now 40 KM. This is a warning. Drive safely! . Speeding by 1-15 KM and limit is NOT 40 KM a) What is the speed limit? 75 b) What speed were you travelling? 90 You were driving 90 KM in a 75 KM zone. Your speed was 15 KM over the limit. Your fine is $120. Speeding by 16 - 30 KM a) What is the speed limit? 30 b) What speed were you travelling? 50 You were driving 50 KM in a 30 KM zon Your speed was 20 KM over the Your fine is $200. >>> What is the spese cy and intellektual property Speeding by 31 - 50 KM b 73 You were driving 73 KM in a 30 KM zone. Your speed was 43 over the limit. Your fine is Speeding by over 50 KM and DOES NOT HAVE speeding tickets a) What speed limit? 80 b) were you travelling? 131 c) have previous speeding tickets (YES or NO)? no were driving 131 KM in a 80 KM zone. speed was 51 KM over the limit. Your fine is $1000. at this post KM internetes Speeding by a) What is the speed limit? 80 b) What speed were you travelling? 131 b) What speed were you travelling? 90 1 - 15 KM and limit is NOT 40 KM You were driving 90 KM in a 75 KM zone. Your speed was 15 KM over the limit. Your fine is $120. a) What is the speed limit? 30 b) What speed were you travelling? 50 Speeding by 16 - 30 KM You were driving se KM in a 30 KM zon Your speed was 20 KM over the Your fine is $200. a) What is the speed limit one and interual property b) What speed were you Speeding by 31 - 50 KM Avelling? 73 You were driving 73 KM in a 30 KM zone. Your speed was 43 KM over the limit. Your fine is $555. a) What b) c) speed limit? 80 were you travelling? 131 have previous speeding tickets (YES or NO)? no Speeding by over 50 KM and DOES NOT HAVE speeding tickets then someone you to the were driving 131 KM in a 80 KM zone. Your fine is $1000. ef this ass speed was 51 KM over the limit. a) What is the speed limit? 80 b) What speed were you travelling? 131 c) Do you have previous speeding tickets (YES or NO)? YES Der 50 KM and HAS speeding tickets You were driving 131 KM in a 80 KM zone. Your speed was 51 KM over the limit. Your license is now suspended for 1 month. Using text as written in the previous screenshots, your program should: (a) Prompt for the speed limit and the driver's speed (b) If the driver wasn't speeding, output an appropriate message. (c) If the driver was speeding, calculate the fine owed keeping in a. If the driver was driving between 1 and 15 KM the speed limit when the speed limit is 40 KM/hr, warning. Otherwise, apply the expected fine. b. If the driver was speeding over 50 KM/hr above the speed limit, then determine if the driver has previous speeding tickets. Ensure the response is not case sensitive, If the ajintellect to the driver a Barity porn driver's license. On the expected fine. (d) Output Ensure you test your code thoroughly! The screenshots provided do not show all potential inputs. At minimum, you should test on the boundaries of each row within the table. For example, test with values that produce 16 KM/hr over the limit and then again with values that produce 30 KM/hr over the limit to ensure both results are calculated with the same formula. If you are sure the boundaries of the ranges work, then the numbers within that range should work as well

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

=+ a. A change in consumer preferences increases the saving rate.

Answered: 1 week ago