1 / 10

Greenfoot B2

Greenfoot B2. Selection IF statements. Today’s Objectives. You will all be able to explain IFs and have added one to your game – level 5. Most of you will add Random Turning behavior – level 6. Some of you will add Random turn amounts in both directions – level 7. Definition.

early
Télécharger la présentation

Greenfoot B2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Greenfoot B2 Selection IF statements

  2. Today’s Objectives • You will all be able to explain IFs and have added one to your game – level 5. • Most of you will add Random Turning behavior – level 6. • Some of you will add Random turn amounts in both directions – level 7.

  3. Definition • It’s a conditional clause • Also known as an If, Then, Else statement • With a Yes/No or True/False question • If something is true then do option A. • Otherwise take option B if it exists.

  4. Start If you are MALE Sit Down FALSE TRUE Stand Up Stop

  5. Start If your name has less than 7 letters Stand Up FALSE TRUE Sit Down Stop

  6. Start If you are wearing WHITE socks OR a BLACK jumper Stand Up FALSE TRUE Raise Your Left Hand Stop

  7. Start If you have blonde hair AND were born in an Odd month Sit Down FALSE 1 – Jan 2 – Feb 3 – Mar 4 – Apr 5 – May 6 – Jun 7 – Jul 8 – Aug 9 – Sep 10 – Oct 11 – Nov 12 - Dec TRUE Cross your arms Stop

  8. Start If your first name has less than 7 letters If your last name has more than 10 letters FALSE FALSE TRUE TRUE Stand Up Sit Down Levitate Stop

  9. Start If you are NOT at home TRUE Sit Down Stop

  10. Homework • Think about what features a simple platform game needs to be successful? • Compare your ideas to classics like Pacman, Mario and Sonic. • Use http://www.wordle.net to represent your words in an image and upload it to your blog. • Unless your teacher says otherwise – due NEXT LESSON!

More Related