Question: For this example, you are going to build a simple cruise control system. Assume the speed is set to 6 5 mph ( call this
For this example, you are going to build a simple cruise control system. Assume the speed is
set to mph call this variable sset Start by having the code ask the user for the current
speed and save it to the variable s The system will respond in one of the ways below:
If the speed is mph lower than the set speed, the car speeds up by mph
If the speed is mph higher than the set speed, the car slows down by mph but
If the speed is mph higher than the set speed, the car slows down by mph
Build a script file that integrates the logic above using an if Be very careful with your else
statement though. Notice there is one logical expression missing from the list that you need to at
least consider.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
