Lesson 1

179 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
179
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lesson 1

  1. 1. Lesson 1 - Scratching the Surface
  2. 2. Lesson 1 – Scratching the Surface LessonThis lesson introduces the Scratch programmingenvironment, including the basic terms utilised inthe language. You will create your first computerprogram based on a cat walk scenario.Objectives Identify the major parts of the scratch Understand how sprites and blocks work Understand the concept of a computer program Work with simple animation and sound
  3. 3. Lesson 1 - Scratching the SurfaceWatch the ScratchIntro video, this will introduceyou to Scratch and its screen layout.
  4. 4. Lesson 1 - Scratching the SurfaceA Scratch program contains sprites (characters)that “perform” on a stage. Sprites and the stagehave three kinds of properties (or settings).Scripts: These are the instructions that control asprite. Scripts are made from blocks.Costumes/Backgrounds: Costumes are “outfits” fora sprite. Backgrounds are just like costumes but forthe stage.Sounds: These are sounds that sprites or the stagecan use.
  5. 5. Lesson 1 - Scratching the SurfaceTask 1: Up on the CatwalkWatch the Catwalk video. Thiswill go over the main elementswithin Scratch and take youthrough the task of creatingyour first computer program.Create the program. If you get stuck, go back to the video or ask your partner.
  6. 6. Lesson 1 - Scratching the Surface Congratulations – you have just started yourjourney to become a computer programmer!
  7. 7. Lesson 1 - Scratching the SurfacePutting things in order•Blocks in the same script get executed (carriedout) in sequence, one after the other.•Blocks in separate scripts can sometimes beexecuted at the same time. This is called parallelprocessing – having the computer do more thanone thing at a time.•For example, if you have several scripts, they willall get executed together when the green flag isclicked.
  8. 8. Lesson 1 - Scratching the SurfaceChallenge: Dance awayTry to make a sprite dance in time to music,starting the program when the green flag isclicked. Watch the DancingQueen video to giveyou some inspiration.
  9. 9. Lesson 1 - Scratching the SurfaceQuestion 1.1Look at the section of codeopposite that controls a sprite.What you think the user will see when the greenflag is clicked.Now try out the code yourself and see if you wereright.
  10. 10. Lesson 1 - Scratching the SurfaceQuestion 1.2Now add a wait 1 secs block between the twomove blocks.What happens now?Why did this happen?
  11. 11. Lesson 1 - Scratching the SurfaceQuestion 1.3Look at the section of code below that controls asprite.What do you think the user will see when the greenflag is clicked.Why? Now try out the code yourself and see if youwere right.
  12. 12. Lesson 1 - Scratching the SurfaceQuestion 1.4In the stack of blocks below, how many timesdoes the sprite move 10 steps?
  13. 13. Lesson 1 - Scratching the SurfaceQuestion 1.5A programmer wants the cat to dance to somemusic. However, the cat doesn’t start dancinguntil after the music has finished!Why is this?
  14. 14. Lesson 1 - Scratching the SurfaceQuestion 1.6In the example below, a programmer has chosen apiece of music (sound “Xylo1”) to play during agame. However, when the green flag is clicked,the computer just plays the first note of the music– over and over again!What mistake has the programmer made?
  15. 15. Lesson 1 – Scratching the SurfaceObjectives Identify the major parts of the scratch  Understand how sprites and blocks work  Understand the concept of a computer program  Work with simple animation and sound Keywords Sprites  Motion Blocks  Control Costumes  Coordinates Processing  Code

×