Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function for checking the speed of drivers. This function should have one parameter: speed. 1. If speed is less than 70, it
Write a function for checking the speed of drivers. This function should have one parameter: speed. 1. If speed is less than 70, it should print "Ok". 2. Otherwise, for every 5km above the speed limit (70), it should give the driver one demerit point and print the total number of demerit points. For example, if the speed is 80, it should print: "Points: 2". If the driver gets more than 12 points, the function should print: "License suspended". 3. 1. Write a program that asks the user to guess a random number between 1 and 10. If they guess right, they get 10 points added to their score, and they lose 1 point for an incorrect guess. Give the user five numbers to guess and print their score after all the guessing is done. Ask the user to enter 10 test scores. Write a program to do the following: a. Print out the highest and lowest scores. b. Print out the average of the scores. c. If any of the scores is greater than 100, then after all the scores have been entered, print a message warning the user that a value over 100 has been entered.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Answer Function for Checking Speed of Drivers def checkspeedspeed if speed 70 printOk ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started