Section 3 Calculations National 4/5 Scratch Course.

Slides:



Advertisements
Similar presentations
SCRATCH Lesson Two – Interactive Concepts Using Sensing, Operators, and Variables.
Advertisements

1-6 Multiplying and Dividing Integers Course 3 Warm Up Warm Up Problem of the Day Problem of the Day Lesson Presentation Lesson Presentation.
Multiplying Out Single Brackets.
1 An introduction to programming concepts with Scratch.
An intro to programming concepts with Scratch Session 2 of 10 sessions I/O, variables, simple computing.
Addition Subtraction Multiplication Division
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech June 2011.
REVIEW Inverse Operations
Prerequisite Skills VOCABULARY CHECK ANSWER factors; product ANSWER difference 2. You subtract to find the ? of two numbers. Copy and complete using a.
Multiplying and Dividing Integers
The Scratch Calculator You are all going to be real computer programmers!!!
Transparency 2 Click the mouse button or press the Space Bar to display the answers.
Rational Expressions PreRequisite Skills: Exponents and Factoring.
Section 2 Variables National 4/5 Scratch Course. What you should know after this lesson What a variable is Where variables are stored How to get data.
Holt Algebra Order of Operations Warm Up 8/12/09.
Essential Question: Why is dividing the same as multiplying by the reciprocal of that number?
Section 4.4 Mixed Numerals
Multiplying decimals. What is the answer to 0.26 x 0.6? In order to work this out you must be able to multiply the whole numbers together In fact do just.
Numbers that name part of a whole or part of a group
Scratch Programming Lesson 4 Question asking and answering.
Section 1 Introduction National 4/5 Scratch Course.
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.
Lesson 4-2 Operations on Functions. We can do some basic operations on functions.
Positive and Negative numbers. Negative numbers A positive or negative whole number, including zero, is called an integer. For example, –3 is an integer.
MNU 3-03a MNU 3-03b 4-Dec-15Created by Mr. Lafferty Maths Dept. Whole Numbers Mental Basic Operations Multiplying / Dividing by 20, 50,
Spreadsheets Lesson 1: Introduction. Lesson Objectives To understand what a spread sheet is and how it can be used To identify the features of a spreadsheet.
One step equations Add Subtract Multiply Divide  When we solve an equation, our goal is to isolate our variable by using our inverse operations.  What.
Computer Programming Modeling a Passive Solar Home.
FOUR RULES FOR FRACTIONS. numerator denominator The language of fractions improper fraction mixed number.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
Whole Number Keywords & Layout IMPORTANT Addition Key Words SumAddTotal Subtraction Take-awayDifference x9 3.
Addition Multiplication Subtraction Division. 1.If the signs are the same, add the numbers and keep the same sign = = If the.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
What are Indices? Indices provide a way of writing numbers in a more convenient form Indices is the plural of Index An Index is often referred to as a.
BODMAS.
ORDER OF OPERATIONS LESSON 2.
Computer Programming Modeling a Passive Solar Home.
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech.
Mental Math Everyone Take out a sheet of paper and Number your page = = = = = =
COMPUTER PROGRAMMING Year 9 – lesson 1. Objective and Outcome Teaching Objective We are going to look at how to construct a computer program. We will.
Music You buy a used guitar for $50. You then pay $10 for each of 5 guitar lessons. The total cost can be found by evaluating the expression 
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Input, Output and Variables GCSE Computer Science – Python.
Programming Simple Programming Variables.
Multiplying and Dividing Integers
Module 1: Investigation 2 Repeating and Alternating Patterns
FOUR RULES FOR FRACTIONS
Madlib-Input, Strings, and Lists in Scratch
Scratch 7B IT1.
1-6 Order of Operations Warm Up Lesson Presentation Lesson Quiz
Spanish Mad libs with Scratch
Assignment statement:
Variables, Expressions, and IO
Knowing your math operation terms
BODMAS.
Objectives By the end of the lesson students will:
Calculate! 3 X ÷ 2 8 ? 19 ?.
Learning Outcomes –Lesson 4
BODMAS explained Joshua and Mohammed Thank you Introduce each other.
An intro to programming concepts with Scratch
Variables & getting info from the user
Multiply and divide Expressions
Scratch 7B IT 1.
Python Creating a calculator.
Presentation transcript:

Section 3 Calculations National 4/5 Scratch Course

What you should know after this lesson How scratch stores numbers How to use variables in calculations What operators do The importance of sequence in calculations

Variables These are storage locations in RAM, controlled by the programming language. What types of data might we need to use with our programs? The main ones we will be using are –Numeric –String

Numeric Are used for calculations. If you need to use a piece of data in a calculation you should use a number variable.

Scratch Variables 1.Click on the variables tab 2.Click “Make a variable” 3.Type the name you want to use for the variable The scratch language is able to work out the type of variable we are using and as a result it only has the one type of variable

Displaying Variables We can get any sprite to speak by using the say block from inside looks. Variables can be displayed on the stage for example to display information useful to the user.

Calculations For this task we are going to add two numbers together Create a new scratch project and add two new variables called first and second Add the script shown below Copy the program into your jotter and answer. 1.What does the program do? 2.Why do we need First & Second?

Other Operators Copy the blocks on the right into your jotter. Write beside each one what it does How could we do bigger calculations?

Combining Operators Scratch Operator blocks (+-*/) can be combined to make more complex calculations. Simply drag a block into the white box. Remember the BODMAS rules from maths. Brackets () Of ^ Division / Multiplication * Addition + Subtraction -

Task Calculate the answer to the following problems, write the answers in your jotter. (you can use a calculator) Enter the calculations into scratch and check your answers * *6 5.(34+3)*6 6.40/ /5

How can we get it to display the full sum as the answer? You can add join to join to make a longer sentence. To drag the whole script block drag the lowermost block. Edit the program to subtract, multiply & divide. Save it in your network area.

Assignment of variables Variables can be assigned values using the set block. Variables can be assigned the results of a calculation as well as the answer to an ask block.

Review Questions Copy and answer these questions in your jotter. 1.Where does scratch store numbers? 2.What is assignment? 3.What do arithmetic operators do? 4.Why is the sequence of calculations important?

Tasks Create scratch programs to do the following (save each in your network area). 1.Calculate the area of a rectangle 2.Calculate the square of a number 3.Calculate the sum of three numbers 4.Calculate the average of three numbers