![Page 1: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/1.jpg)
Key Stage 2 – Scratch, Python and Kodu (Beginners)
![Page 2: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/2.jpg)
The Aims
• Explored a progression of beginner activities in Scratch a visual programming language
• Programmed new worlds in Kodu,
Game Creation Software • Explored Python as a text-based
(scripting) programming language
By the end of this session, you will have:
![Page 3: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/3.jpg)
Programming Software
![Page 4: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/4.jpg)
Scratch Activities
Visual Programming
• Controlling Characters • Music Machine • Etch a Sketch • Racing Car • Ping Pong • Maths Quiz • Diameter and Perimeter • Other Examples
![Page 5: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/5.jpg)
Scratch Programming http://studio.code.org/
A visual programming language that allows children to build computer programs by snapping statements together like Lego blocks using drag and drop.
![Page 6: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/6.jpg)
Different Sets of
Commands
The Stage - where
your program is run
The Scripts Panel
where you build the
commands to run
your program
Different Blocks
of commands
The
Scratch Interface
The Sprite – the
object you control
![Page 7: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/7.jpg)
Controlling Characters
When the flag is clicked: 1. Move the sprite - Forever 2. Keep turning the sprite around 3. Animate the sprite 4. Add a backdrop 5. Add a sound 6. Insert another sprite to catch!
![Page 8: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/8.jpg)
Music Machine
Button 1
Button 2
Button 3
1. Draw 3 buttons
2. Import a sound
3. Write the program
for each button
![Page 9: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/9.jpg)
Create ‘etch a sketch’
![Page 10: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/10.jpg)
‘if …...then’ selection
![Page 11: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/11.jpg)
Racing Car Game
![Page 12: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/12.jpg)
Ping Pong Game
Key Words / Ideas
forever loop
‘‘if’ … ‘then’ selection
variable – score / speed
Challenges
Create your own version.
Can you create a two player
game?
Player 1 controls: up & down
Player 2 controls: w & s
Add a points value - You win
when you get 5 points
![Page 13: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/13.jpg)
![Page 14: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/14.jpg)
![Page 15: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/15.jpg)
Maths Quiz
Program a Maths Quiz in Scratch that uses the selection ‘if’… ‘then’…. ‘else’
Selection Allows the program to make choices
according to a condition: if … then …..else ………
Variables Something your program might need that changes score … speed ……time
![Page 16: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/16.jpg)
Program a Maths Quiz in Scratch that uses selection ‘if’… ‘then’…. ‘else’……..
Key Words / Ideas
‘if’ ‘else’ Selection
Variable for score
Algorithm to code
![Page 17: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/17.jpg)
Use the selection blocks ‘when’ and ‘if’ …… ‘then’ to sense when something is going to happen
Key Words
forever loop
‘when’ selection block
‘if’ ... ‘then’ selection block
variable – score
Felix and Herbert Game
![Page 18: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/18.jpg)
Felix and Herbert
Activity • Create a backdrop • Add 2 sprites • Felix chases Herbert • Herbert faces Felix and moves
with the computer mouse • When Felix catches Herbert,
switch costume to dead! • Add a variable called score, add 1
point forever and if Herbert is caught, broadcast it and – 100 points.
![Page 19: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/19.jpg)
Felix and Herbert
![Page 20: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/20.jpg)
Felix and Herbert
Felix the Cat Make a variable
![Page 21: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/21.jpg)
Key Vocabulary
Repetition Statements that perform a repeat
(or loops) Forever, Repeat
Selection Allows the program to make choices
according to a condition: if … then…..else
Sequence All of the ‘steps’ that are
followed in order
Debugging Find and fix mistakes in a
program
Variables Something your program might need that changes score … speed ……time
![Page 22: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/22.jpg)
Sequence
What shape have I
programmed with my
sequence of instructions?
What will happen to
my character in this
sequence?
![Page 23: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/23.jpg)
Generalisation Phil Bagge
Adapting a solution that solved one problem to solve another.
Diameter of circle = radius * 2
Perimeter of pentagon= length* 5
Algorithm
Code
![Page 24: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/24.jpg)
Debug – Find and Fix
• All programmers make mistakes
• Mistakes and debugging is a normal part of the programming cycle
• Not the teachers job to debug pupil’s code
• It encourages independence
![Page 25: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/25.jpg)
Other Examples http://www.code-it.co.uk/csplanning.html
Escape the room Flappy Bat
10 Block Challenge
![Page 26: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/26.jpg)
Python Programming
Python is a text-based (scripting) programming language.
![Page 27: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/27.jpg)
Navigating IDLE/Shell
Open IDLE / Shell 300+400 987-653 12*9 30/6
Open New Window/File - Save - Helloworld.py
![Page 28: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/28.jpg)
Python Programming
“Hello World” Program In Python, a command called “print” displays the text on the screen
Save File ‘Run’, ‘ Run Module’
print ('Hello World') print (‘This is my first program’)
![Page 29: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/29.jpg)
Variables and Comments
1. Variables may be though of as boxes within our program where we can place data (numbers or text). We can then use the contents of the boxes within our program and that the values assigned to our variable (the contents of our boxes) may change as our program runs.
![Page 30: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/30.jpg)
Programming in Pairs
“… a software development technique in which two programmers work together at one workstation. One, the driver, types in code while the other, the navigator, reviews each line of code as it is typed in. The two programmers switch roles frequently.
The Driver Types the code Thinks completing task using observer as a guide
The Navigator Thinks direction of outcomes Suggests improvements Looks for problems in the code
![Page 32: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/32.jpg)
Support Website
www.pluscomputing.wordpress.com
![Page 33: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/33.jpg)
Scratch Junior – ipads only
![Page 34: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/34.jpg)
![Page 35: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/35.jpg)
![Page 36: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/36.jpg)
![Page 37: Key Stage 2 Scratch, Python and Kodu (Beginners) · The Aims • Explored a progression of beginner activities in Scratch a visual programming language • Programmed new worlds in](https://reader031.vdocuments.us/reader031/viewer/2022022513/5b157de67f8b9ae7348cbe2c/html5/thumbnails/37.jpg)
Solve It!
Next, create a sequence for a character and put it into full screen mode. Play the sequence Circle the commands needed for that algorithm