TORONTO KIDS COMPUTER CLUB | PMCA Saturday 18:30 Python Homework 20.04.11.
17357
post-template-default,single,single-post,postid-17357,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

PMCA Saturday 18:30 Python Homework 20.04.11.

17 Apr PMCA Saturday 18:30 Python Homework 20.04.11.

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


Hint:

No Comments

Sorry, the comment form is closed at this time.