What If, Else

Share on facebook
Share on twitter
Share on linkedin
Share on email

Life is full of tough decisions. If a banana is nice and yellow you better grab it quick, but what if it is green or frozen? Or both?? Meet your new goat friend in the land of snowy mountains to learn about If & Else.

If-Else is a very important part of coding. It allows your program to perform different actions in different situations.

For example, the following code makes the goat grab the banana if it’s green, or else let the monkey grab it:

if b.green()

goat.goto b

else

monkey.goto b

Try CodeMonkey at home or at school!

free trial, credit card not required

or

for your school / district

More to explore:

Beaver Achiever blog

JUST OUT: BLOCK-BASED CODING COURSE

What do blocks, a beaver, and banana smoothies have in common? They’re all part of CodeMonkey’s latest game – Beaver Achiever! Beaver

STEM projects for preschoolers

STEM Activities for Preschool

Easy STEM Activities for Preschool There is nothing quite as satisfying as watching a preschooler smiling with excitement. Whether they just learned

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.