If Else Lesson
Ok, in this lesson you are going to get the opportunity to use the if / else statements to write a program. If you need help executing this program use the previous set of videos as an aid. Most of the information that you need is contained inside those videos.
Videos
Your job is to write a program for a stop light speed camera.
Write a program that asks the user to enter the speed limit.
Once set, the program asks for the speed of a car.
If the user enters a value less than the speed limit, program should display "The car is traveling within the posted speed limits" on the console.
If the value is above the speed limit, the program should calculate the number of demerit points that will go against this persons license.
For every 5 mph above the speed limit, 1 demerit points should be incurred and displayed on the console.
If the number of demerit points is above 12, the program should display "This driver has just had their Drivers License Suspended."
Write a program that asks the user to enter the speed limit.
Once set, the program asks for the speed of a car.
If the user enters a value less than the speed limit, program should display "The car is traveling within the posted speed limits" on the console.
If the value is above the speed limit, the program should calculate the number of demerit points that will go against this persons license.
For every 5 mph above the speed limit, 1 demerit points should be incurred and displayed on the console.
If the number of demerit points is above 12, the program should display "This driver has just had their Drivers License Suspended."