Presentation is loading. Please wait.

Presentation is loading. Please wait.

24 Background Building 25 Computing Terminology, and Speed/Velocity 26 27 Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,

Similar presentations


Presentation on theme: "24 Background Building 25 Computing Terminology, and Speed/Velocity 26 27 Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,"— Presentation transcript:

1 24 Background Building 25 Computing Terminology, and Speed/Velocity 26 27 Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms, Functions, and Control Tools 29 30 31 32 33 34 35 36 37 38 39 Table of Contents 2 Module 1

2

3  These tools are used to detect something  Sprites touching sprites  Sprites touching colors  User key entries  User text entry (i.e. Module 2)

4  We use these to help make decisions  Checks to see if something is true  Or: this checks if one condition is true OR another condition is true  We can put multiple Operators together

5  Located under Control tools  Conditional Looping: Repeat functions over and over again in your program for some desired effect.  Wait Until: keeps checking until the condition is true. Then is performs an action.

6  A type of Conditional Logic  A calculation that uses IF-THEN-ELSE logic like in Module 3.  But this one only has IF  Your program does what ever is inside of it, IF the variable is true.

7  This tells Scratch to stop that piece of code from multitasking  If too many tools are multitasking it will slow down your computer  Stop Script stops processes (jobs) that do not need to be completed or are done

8

9  Describe in detail what a normal school day is like:  What major things do you always do on your own? (  What major things does the school make you do on a daily basis?  What do you do first in this formula: (3 + 4) x (2 x 4)  What is a job? (  If we do more than one job at a time what is that called

10  A set of rules that define a sequence of steps that have to be done ▪ This is basically what your daily schedule looks like at school.  In Math: it is step-by-step procedure for calculations like PEMDAS  In MIRD: The computer will go through steps to create some output. We program the steps in Scratch ▪ This Algorithm will receive Yellow broadcast ▪ Switch costumes and ▪ The output is that it shows the costume

11  A function completes a job  A function completes a process  When you put multiple algorithms (steps) together they create functions ▪ Algorithms tell how the function works  Math: a function is also a formula like the formula for speed: ▪ Speed = Distance/Time ▪ This function tells us how fast something goes  MIRD: our computer programs can have hundreds or thousands of functions (see next slide)  Functions use all of the tools in Scratch

12

13  What is this functions job? ▪ It resets the three variables back to zero.  What is this functions job? ▪ It tells the sprite to go to a certain XY coordinate and then glides to the coordinates given

14  What type of jobs do computer do in our lives: (answers will vary)  What type of jobs do we want computers to do and not stop  Give an example of when you made a decision based upon another decision (start by using IF):

15  These control tools run Forever  They never stop unless we tell them to stop  It keeps running our function by starting over after it completes it  We will use Forever to check if we are touching another sprite  In our program we will need to forever to keep checking if the finish line is touching the winning sprite

16  Embedded means something is inside of something else ▪ A hamburger is embedded within a bun  We embed IF/ELSE conditions to make multiple decisions ▪ Think of our examples from the left side 2 ▪ A decision based upon another decision ▪ Conditional Logic: a condition based upon another condition Example  If: touching Sprite 2: Turn right 15 degrees  Else: If: touching Sprite 3: change color effect ▪ Else: say “I’m touching nothing”


Download ppt "24 Background Building 25 Computing Terminology, and Speed/Velocity 26 27 Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,"

Similar presentations


Ads by Google