Algorithms in Scratch How to plan your code. Algorithms Algorithms provide computers with a set of instructions or a set of rules. They are written BEFORE.

Slides:



Advertisements
Similar presentations
Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Advertisements

Scratch is a Visual Programming Language
Michael Parkes Dudley LA What can Scratch do? Make simple games, animations, presentations and stories.
Harry Potter Scratch Game
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
Scratch Programming Session 9 of 10 Review elements to use in stories, games, etc.
Session 5 of 10 Review + Multiple Sprites
An intro to programming concepts with Scratch Session 7 of 10 sessions Working with sounds and sprite communication.
1 An intro to programming concepts with Scratch Session 1 of 10 sessions Looks and Motion.
Scratch Understanding some programming techniques using Scratch Resetting, Parallelism and Events.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
Code Club Session 2 Dance Party. What will we learn ?  How to change the background  How to create animations  How to make objects talk to each other.
The 4 th grade Nutley TALENT cohort shares: SCRATCH.
Algorithms In general algorithms is a name given to a defined set of steps used to complete a task. For example to make a cup of tea you would fill the.
Timers Exploring Computer Science Lesson Objectives The students will be able to: Create a timer.
Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007.
Getting Started With HTML HTML code needs an editor for a programmer to be able to use. We can use Notepad on a PC or TextEdit on a Mac. However, it is.
Exploring Computer Science 2/23/15 2/23 Develop a Scratch story project -Brainstorming 2/24 Develop a Scratch story project –Developing 2/25 Develop a.
Introducing Scratch the Cat
Exploring Computer Science 2/16/15
My Scratch Story Exploring Computer Science Lesson 4-7.
Viking Raid Animation KS2: Use sequence in programs.
Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.
I put this into my scratch so that when the green flag was clicked to start the game, and wait an amount of seconds before the QR changes.
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
Exploring Computer Science 2/2/15 2/2No School 2/3Scratch creating a program- Name 2/4 Scratch creating a program Dialogue 2/5 Scratch creating a dialogue.
Scratch Dialogues Exploring Computer Science – Lesson 4-3.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Image #1 Getting Started
Scratch Another computer programming language Developed by MIT in 2003
Scratch Programming Lesson 3 Create a story. We are going to learn… How to change the background How to use the “say” and “think” bubbles How to change.
24 Background Building 25 Computing Terminology, and Speed/Velocity Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,
From last time… Explore the blue commands from the motion menu Find at least three ways to get the sprite to move to the UPPER LEFT corner.
Cloning in Scratch Computer App Session 6. Cloning in Scratch Learning Objectives: I will clone sprites in Scratch to create copies of an existing sprite.
How to create a sprite Delete a sprite (e.g. the cat) by right clicking on it and choosing delete. Go to the bottom right hand corner and choose a new.
How to create a sprite Delete a sprite (e.g. the cat) by right clicking on it and choosing delete. Go to the bottom right hand corner of the stage and.
Welcome to Scratch By Miss Key. The Main Screen Viewing screen with choice of views.
 Scratch Coordinate & Movements Scratc h Coordinate and Movement.
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
I have used Scratch, to program a guide to internet safety. This is done by using QR codes to make it more interactive and interesting for people playing.
Changing Backgrounds 3 methods of achieving this.
Getting Started With Scratch Brendan Routledge
Unit 4 Day 1 FOCS – Introduction to Programming. Moving a Sprite Relative vs. Absolute postitioning Gliding.
Introducing Scratch Learning resources for the implementation of the scenario
© it’sLearning 365 Limited | Screen 1 FLASH enabled How to use me : Teachers Notes Useful Web Link Ne xt Pa ge Ne xt Pa ge Navigate.
PROCEDURES IN SCRATCH Message Broadcasting and Receiving.
Event Driven Programs Exploring Computer Science – Lesson 4-5.
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Commands in Scratch.mit.edu
Scratch 7B IT1.
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
© A+ Computer Science -
Exploring Computer Science Lesson 4-7
Games Programming in Scratch
Computing Year 7 - Unit 2 Programming Basics Scratch Basics.
Introduction to Object-Oriented Programming
Areas of the SCRATCH 2 Screen
Maze Race. Maze Race Race The first thing you need to do is change the background so click on stage. Then click on background. Now click paint Select.
Exploring Computer Science Lesson 4-7
Code to Enhance Learning
Image #1 Getting Started
Exploring Computer Science Lesson 4-12
Introduction to Snap Programming
Getting Started with Scratch
Game development using Scratch
Exploring Computer Science Lesson 4-12
Animate a Sprite. By M, M and C P6
Presentation transcript:

Algorithms in Scratch How to plan your code

Algorithms Algorithms provide computers with a set of instructions or a set of rules. They are written BEFORE the code is written.

Do you recognise this algorithm? When the green flag is clicked: Go to bottom corner Glide 2 secs to centre Say Hello! for 2 secs Wait 2 secs Say What are you doing today? for 2secs Stop Script

Can you write the opposite part of the conversation? The brief: Can you make this animation so that: Two characters glide towards each other Then have this conversation: “Hello” “What are you doing today?” “I’m learning about Scratch.” I’ll start you off: When the green flag is clicked:

Can you write the opposite part of the conversation? Finished algorithm: When the green flag is clicked: Go to the bottom Glide to the centre Wait 2 secs Say “Hello” for 2 secs Wait 2 secs Say “I’m learning about Scratch” for 2 secs Stop script

Student activity – create the algorithm Look carefully at the storyboard and write the algorithm that will help you with the code.

Broadcasting events We can use broadcasting to sequence our animation. Watch scratch animation 4 as this uses broadcast events. Here the stage controls the sequence of events. Each event starts (when I receive..) after the stage has broadcast the event name.

Challenge 4 The brief: The two sprites need to continually blink throughout the program. The two sprites need to: start at the bottom glide to the centre say hello to each other One sprite should then say this is where he went on holiday and he likes the forest. The second sprite should then say this is where he went on holiday and he likes the beach.

Challenge 4 – the algorithms to help you Stage: When green flag clicked: Switch to background desert Broadcast conversation 1 and wait Switch to background forest Broadcast visit 1 and wait Switch to background beach Broadcast visit 2 and wait Stop all You will need to set up three backgrounds – a desert, forest and beach as well as the two sprites. Sprite 1: When I receive conversation 1: Go to bottom corner Glide to centre Wait 2 secs Say Hello! for 2 secs Stop script When I receive Visit 2: Say This is where I went on holiday for 2 secs Say I like the beach for 2 secs Stop script Sprite 2: When I receive conversation 1: Go to bottom corner Glide to centre Say Hello! for 2 secs Stop script When I receive Visit 1: Say This is where I went on holiday for 2 secs Say I like the forest for 2 secs Stop script