Answered step by step
Verified Expert Solution
Link Copied!

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

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 ... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago