Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session 5 of 10 Review + Multiple Sprites

Similar presentations


Presentation on theme: "Session 5 of 10 Review + Multiple Sprites"— Presentation transcript:

1 Session 5 of 10 Review + Multiple Sprites
Scratch Programming Session 5 of 10 Review + Multiple Sprites

2 Objectives for Session 5
Review Binary Review Algorithms Multiple sprites

3 Binary What is Binary? What Numbers are used in Binary?

4 Binary conversion Algorithm
Convert 25 into binary 1/2 = 3/2 = 6/2 = 12/2 = 25/2 = 25 in Binary is 11001

5 Try these examples on your own:
Convert to Binary: 36 52 67 1342 Bonus: convert this from binary to decimal 110011

6 The other way around How do you convert into Base 10 (our number system)? = 33 16 8 4 2 1

7 Try these numbers 010101 011111 000011 32 16 8 4 2 1

8 Game 2 Teams (Left Side vs. Right Side)
The number must be: Less than 7 digits in binary or Less than 100 in Base 10 2 Teams (Left Side vs. Right Side) Each team comes up with a number, in binary or in base 10 The other team has to convert it. 30 seconds to answer Highest Score after 5 rounds wins!

9 ASCII ASCII stands for the American Standard Code for Information Interchange It’s a way for computers to represent letters or characters in Binary Each letter or symbol gets a specific sequence of numbers

10 ASCII Example The character “A” is represented in binary as The character “a” is represented as All the characters are represented in some form of this binary code

11 Dr. Stockman’s Block Coding Activity
Close Scratch Dr. Stockman’s Block Coding Activity

12 Algorithms What are Algorithms again?
Instructions or Recipes for how to do a specific thing, such as find the area of a square What Algorithms have we done before? Area of a Square, Perimeter, Area of a triangle, Average number of people What other Algorithms can you think of?

13 Variable Practice Let’s calculate the distance between 2 points
First, we ask the user for point 1 Ask “What is point 1” and wait Then we save that as a variable Set point1 to answer Now do the same for Point 2

14 Variable Practice Cont.
Now we need to find the distance between the 2 points Set Result to Point2 – Point1 Say Result

15 Exercise: Calculate Average Age
Calculate the Average of two ages Hints: 3 Variables (Age1, Age2, Result) Ask for Age1 and Age2 Average of 2 ages is (Age1+Age2)/2 Say the Result Show us when you’re done BONUS: Can you make it average more than 2 people?

16 Multiple Sprites So far, we’ve only been using a single sprite to do everything. Scratch is designed to handle more than one Sprite

17 Adding A new sprite On the bottom left panel of scratch, click “import sprite” Choose the sprite you want to import Click “okay”

18 Important things to know
Notice that the scripts from your first sprite are NOT visible when you have this sprite selected Any scripts you add to this sprite will only work with THIS SPRITE.

19 Naming your sprites Something helpful when you have multiple sprites is Naming them something you’ll recognize later. Lets do this now:

20 Changing a Sprite’s name
Click on the sprite whose name you want to change Click in the Box near the sprite’s picture Type in the new name and hit enter

21 Review You now know: How to convert a number to and from binary
How computers recognize numbers and letters How to make an algorithm in Scratch How to add additional sprites to your Scratch Program


Download ppt "Session 5 of 10 Review + Multiple Sprites"

Similar presentations


Ads by Google