Friday 23 June 2017

Text-based programming lesson 4 - Selection

Text-based programming lesson 4 - Selection


Objectives and Outcomes:

  • explain what selection is (band 4).
  • apply your understanding to a program that uses selection (band 5)
  • link what you have learned today to a previous lesson (band 6)

Selection is where the computer chooses which instruction to follow, depending on events or input.  It often includes repetition if the selection needs to be repeated.

Can you think of any example of this?  There's one that you use every computer science lesson!  

1.  Write your example of selection on a new blog post, titled the same as this one.

2.  As the repl.it python-turtle cannot be edited to complete the lesson on Learning Computing website, you are going to do your programming in Scratch instead (even though it's not text-based programming).

3.  Go to scratch.mit.edu and sign in (if you can't remember your user name, it should be written in your planner from earlier this year).

4.  Choose a background for your program and then create a program that has 2 or more sprites which move constantly.

5.  Add in Selection, whereby the sprites make a sound when they touch the edge and show a speech bubble each time they touch each other.

6.  Take a screenshot of your program and paste it to a Google doc, correctly shared to Anyone with the Link.

7.  Create another program which uses selection - free choice to do anything around that!

8.  Create another program that uses selection and loops / repetition.

9. Take a screenshot of your program and paste it to a Google doc, correctly shared to Anyone with the Link.

10.  Copy/paste the link to your Google doc onto your post.

Publish!










No comments:

Post a Comment