TORONTO KIDS COMPUTER CLUB | Sunday 16:00 Python Homework 08.04
16433
post-template-default,single,single-post,postid-16433,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

Sunday 16:00 Python Homework 08.04

06 Aug Sunday 16:00 Python Homework 08.04

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.