TORONTO KIDS COMPUTER CLUB | Monday 17:30 Python Practice – 22.10.10.
21239
post-template-default,single,single-post,postid-21239,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Monday 17:30 Python Practice – 22.10.10.

15 Oct Monday 17:30 Python Practice – 22.10.10.

Question 1:(please use function that return a value)

Write a program to display information to a driver based on his/her speed according to the following table:

km/h over the limit Fine
1 to 20 $100
21 to 30 $270
31 or above $500

Sample Input 1:
Enter the speed limit: 40
Enter the recorded speed of the car: 39

Sample output 1:
Congratulations, you are within the speed limit!

Sample Input 2:
Enter the speed limit: 100
Enter the recorded speed of the car: 131

Sample output 2:
You are speeding and your fine is $500

					
No Comments

Sorry, the comment form is closed at this time.