"Control statements allow us to control the flow of our program's logic. Control statements make decisions based on the result of a condition. The condition produces a Boolean (true or false) result, which determines which statements are executed next." (Lewis & Depasquale, 42)

Lab:
Using Intersection3.a2w, obtained from the x:\4B folder; make the following changes:
1. Modify the decision statement to ensure that:
The Bike turns right 20% of the time.
The Bike turns left 40% of the time.
The Bike goes straight 40% of the time.
2. Ensure that there is a 60% chance that the bell will play when the biker turns left.
No comments:
Post a Comment