In Episode Two of DreamSpace TV we created our very own board games and had to include conditional statements that helped to shape how our game would work.
Remember, conditional statements clearly tell us what actions we should take when a condition is met.
To refresh your memory of conditions work, why not try the quick challenge below? You should respond based on how the statement applies to you.
For example, with the sentence "If you love to code, then put your right hand in the air, else leave your hand down", I would put my right hand in the air!
Challenge: Carry out the correct action based on the conditional statements below:
(a) If your name begins with the letter 'C', then clap once, else clap twice.
(b) If your hair is brown, then point to your head, else put your finger on your chin.
(c) If the month of your birthday is January, February or March, then whistle, else click your fingers.
(d) If you have a pet at home, then do three bunny hops, else do three jumping jacks.
(e) If you have blue eyes, then shout 'blue', else if you have brown eyes, then shout ‘brown’, else shout ‘neither’.
(f) If you had toast with your breakfast, then stick out your tongue, else if you had cereal, then hold your right ear, else hold your left ear.
(g) If your name begins with a letter from ‘A’ to ‘H’, then raise your right hand, else if your name begins with a letter from ‘I’ to ‘Q’, then raise your left hand, else leave your hands on your lap.
(h) If your favourite hobby is to play sport, then jump in the air twice, else if your favourite hobby is playing a musical instrument, then pretend to play the guitar, else if your favourite hobby is reading, then hold your two hands out on front of you with your palms facing up, else put your two hands on your hips.
After completing that challenge, you are definitely ready to watch this episode of DreamSpace TV. You will be combining your knowledge of coding and conditional statements to program a well-known game using MakeCode for micro:bit
The coding challenges will require pupils to have access to an internet connected device (phone, tablet device or laptop) and to log in, on the browser of choice, to https://makecode.microbit.org
Check out the curriculum links for the episodes below:
Strand: Local studies. Strand Unit: Games and pastimes in the past.
Strand: Oral Language, Reading and Writing. Strand Unit: Exploring and using. Genre: Procedure
Strand: Data. Strand Unit: Chance.
Strand: Print. Strand Unit: Making prints.
Strand: Listening and responding. Strand Unit: Exploring sounds