Hi:
My student wanted to write some code that had the gift box change to a duck on the 5th click/move toward so that the user would go click, click, click, click, click and then the duck would replace the box.
I was thinking that an IF/THEN statement would work, but didn’t know how to do it:
e.g. If this is the 1st time the user clicked the mouse, then no change.
If this is the 2nd time the user clicked the mouse, then no change.
If this is the 3rd time the user clicked the mouse, then no change.
If this is the 4th time the user clicked the mouse, then no change.
If this is the 5th time the user clicked the mouse, then change to a duck.
How could he do that?
It’s sort of like putting the click instruction in a loop, but then having the loop end after the 5th click.
Does that make sense?
Thank you.
Gary
PS By the way, I “think” it’s bubble 6, but definitely Lesson 17.