Counters and For
We learned how to find out whether doubles are rolled, and even learned how to keep track of a slot machine coming up cherries. Now, let's try keeping track of some other things with counters.
Let's practice here.
Now, what if we wanted to use that counter for something else? Say we wanted to roll the dice five times to see how many times we came up doubles or sevens? We would need a loop...
No comments:
Post a Comment