Scratch Programming Lesson 5 Programming logic. We are going to learn… Initialize the variables SET VS CHANGE Operator (Part II) Use a variable as a counter.

Slides:



Advertisements
Similar presentations
Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do.
Advertisements

Measures of Academic Progress (MAP). What is MAP? MAP (Measures of Academic Progress) are achievement tests delivered by computer to students.
In this tutorial, we are going to create: A race car that the user can control with the arrow keys for direction and speed. A simulated road with a striped.
Pong! “The oldest commercially available game in history” Resources created from the video tutorials provided by David Phillips on
Calibration Procedure.  A winch calibration is completed via a linear interpolation between 2 points.  Requires 2 references  Known lower weight 
Statistical Techniques I EXST7005 Lets go Power and Types of Errors.
1 An intro to programming concepts with Scratch Session 3 of 10 sessions Repetition and variations.
True/False. False True Subject May Go Here True / False ? Type correct answer here. Type incorrect answer here.
Random Sampling using RAN#. Random Sampling using Ran# The Ran#: Generates a pseudo random number to 3 decimal places that is less than 1. i.e. it generates.
Texas Instruments TI-83 Plus Graphing Calculator Basic Operations.
Lesson 1: Setting up a 2d game 9.5 Lesson Slides.
Evaluating a Function Given a function y = f(x), we are often interested in finding function values for a given x. One example would be to find ordered.
Bug Session Three. Session description In this session, pupils will discover how the Bug software makes drawing shapes easier (this is based on the use.
Scientific Notation Why Do We Need It?.
Lesson 13 Graphing linear equations. Graphing equations in 2 variables 1) Construct a table of values. Choose a reasonable value for x and solve the.
The Scratch Calculator You are all going to be real computer programmers!!!
CC0002NI – Computer Programming Computer Programming Er. Saroj Sharan Regmi Week 7.
Noadswood Science,  To know the basics of Python coding and decoding Monday, September 07, 2015.
30S Applied Math Mr. Knight – Killarney School Slide 1 Unit: Linear Programming Lesson 3: Solving Systems Using Graphmatica Solving Systems Using Graphmatica.
Today in CS161 Lecture #4 Solving Problems with Computers Walk through the Tic Tac Toe Algorithm Getting ready for Creating Programs Turn the Inches to.
Introduction to Python
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
©Robomatter – Distribution or copying without permission is prohibited. 3B STEM Computer Science 1 ©Robomatter – Distribution or copying without permission.
An Introduction to Python Programming Dr. Mark Goadrich Centenary College of Louisiana NWLAPCUG - May 15th 2008.
Linear Inequalities in Two Variables 2-5
Objects and Methods in Scratch 1. 2 Scratch environment Stage is at upper right (where actors act and information is displayed) Sprite is another name.
Bug Session Three. Session description In this session, pupils will discover how the Bug software makes drawing shapes easier (this is based on the use.
Scratch Programming Lesson 2 First glance to programming logic.
Math on the Mind Model y = –2x + 4 with a table of values and a graph.
Example 5 Graphical Solutions Chapter 2.1 Solve for x using the x-intercept method.  2009 PBLPathways.
Moving Sprites in Scratch Exploring Computer Science – Lesson 4-4.
30/10/ Iteration Loops Do While (condition is true) … Loop.
Scratch Programming Lesson 4 Question asking and answering.
GAME102 - INTRO WHILE LOOPS G. MacKay. Fundamental Control Structures  STRAIGHT LINE  CONDITIONAL  LOOPS.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
Algebra Equations Lesson 1-7 Pages Equations An Equation is a sentence that contains an equals = sign. The equals = sign tells you that the expression.
Programming with Microsoft Visual Basic th Edition
Introduction Studying the normal curve in previous lessons has revealed that normal data sets hover around the average, and that most data fits within.
Graphing Number Lines Figure 7.1a For Figure 7.1a, Enter the inequality x < 5 in Y1. The inequality symbols are found under the TEST menu. The “less than”
IIn your web browser type in: YYou should get the following appear:
Game Maker Galactic Mail Advanced Group: Complete Galactic Mail, then start developing an independent project.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
Computer Programming Modeling a Passive Solar Home.
24 Background Building 25 Computing Terminology, and Speed/Velocity Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,
Risk Analysis Simulate a scenario of possible input values that could occur and observe key financial impacts Pick many different input scenarios according.
Iteration. Iteration: Review  If you wanted to display all the numbers from 1 to 1000, you wouldn’t want to do this, would you? Start display 1 display.
Creating Menus Menu Bar – behaves like standard Windows menus Can be used in place of or in addition to buttons to execute a procedure Menu items are controls.
Using MIT Scratch for Programming and Control Exercise 4 – Cat and Dog game Year 9 ICT Autumn Term 2007.
Example 7 Multiplying with Technology Chapter 7.3 Use technology to compute BA and AB if and.  2009 PBLPathways.
Controlling Program Flow with Decision Structures.
Programming a Shooter Game Design.
Get Going On ….. Load the word file ‘Glossary’ and complete it. You will have homework today.
Moving Sprites in Scratch Exploring Computer Science – Lesson 4-4.
Scratch Programming Lesson 1 Moving objects with sound and changing colours.
Introduction to TouchDevelop Lesson 3 – Comments & Lists Created by S. Johnson
Evil Clown – Quiz 1 Gamemaker Quiz 1. Set up your file Save all finished work to your desktop Final file should be called: “yourlastname_evilclown” Open.
Selection Part 2 Using Logical Operators, how strings are compared and random numbers.
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
Scratch I - Overview.
Solving Systems of Equations
Creating Variables Output Logic flow Operators (More) Basic blocks
Use proper case (ie Caps for the beginnings of words)
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Lesson 1 Introduction to Scratch Basic blocks
Topic 1: Problem Solving
Introduction to TouchDevelop
Date: Nov. 14, 2016 Aim: How do we summarize the codes used in SCRATCH
Predicting Chance Outcomes
Presentation transcript:

Scratch Programming Lesson 5 Programming logic

We are going to learn… Initialize the variables SET VS CHANGE Operator (Part II) Use a variable as a counter

Initialization give an initial setting of a variable or set an initial setting use “set” functions for example,

SET VS CHANGE See the following example… What are the effect respectively? The sprite will change its y co-ordinate by 10 whenever “up arrow key” is pressed The sprite will go to y=10 whenever “up arrow key” is pressed When the sprite is originally on y=10… The sprite will move up by changing y co-ordinate The sprite will stay on y=10

Operators (Part II) One number will be randomly chosen from the range given ANDORNOT True False True False These three are operators (i.e. return True or False)

Operators (Part II)(cont.) Extra functions ModRound Reminder after divisionRound off the value with decimal places Some more Maths function here

Use variable as a counter Two methods have the same result: Adv: easier to writeAdv: Can use the variable to set different cases at different values Disadv: cannot tell which repeat values is running Adv: more difficult to write

Task of the lesson Write a program to guess a random number from a range The sprite will give the user 3 chances for the user to enter a number from a range with lower limit of 1 -5 and upper limit from 5 – 10 If the number guess is correct, suitable display; e.g. music and background will be shown If the number guess is incorrect, suitable display; e.g. music and background will also be shown The number of guess left will be displayed on screen