TORONTO KIDS COMPUTER CLUB | Saturday 13:00 Python Practice – 22.10.15.
21256
post-template-default,single,single-post,postid-21256,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

Saturday 13:00 Python Practice – 22.10.15.

20 Oct Saturday 13:00 Python Practice – 22.10.15.

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.