Comparing Two Objects

In this video we will look at using 'if then else' statements.

If it rains today

then I'll wear my coat

else (otherwise) I'll wear my jumper.

 

This video (based on a similar one by Don Slater) shows a bunny choosing the larger of two holes to hop into. (Code can be seen below).

If hole1 is bigger than hole2

then go to hole1 and move down

else goto hole2 and move down

 

 

hint

When programming an IF statement, select the true condition as a placeholder, then adjust the condition once you have put in the code block.

 

Activity - Comparisons

Build your own animation where a character has to move and stand on top of the taller of two objects.

OR you can design your own 'comparison' animation.

Don't forget to include comments in your code.

 

 

Activity - Billy Goat Gruff

Watch the video on the left by Don Slater.

Make your own "Billy Goat Gruff" animation.

 

home   left arrow   right arrow