Asking Questions in BYOB Scratch.

Slides:



Advertisements
Similar presentations
Variables – the Key to Programming. ICS-3M1 - Mr. Martens - Variables Part 1 What is a Variable? A storage location that is given a “name” You can store.
Advertisements

Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech June 2011.
Jeopardy! One Step Equations. Grid Sheet 100 pts.200 pts. 300 pts. 400 pts.500 pts. Vocab Add Subtract
Choose a category. You will be given the answer. You must give the correct question. Click to begin.
Section 3 Calculations National 4/5 Scratch Course.
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.
Agenda Review C++ Library Functions Review User Input Making your own functions Exam #1 Next Week Reading: Chapter 3.
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.
Lab 1 B Objectives 1.Calibrate a thermometer 2.Dimension analysis 3.Generate a graph on excel.
Conversions in the Kitchen Changing between Fahrenheit and Celcius.
Temperature.
One Step Equations and Inequalities Review
Solving 1-Step Equations 2 An Equation is Like a Balance.
Lives and Scoring Games Programming in Scratch. Games Programming in Scratch L2 Lives and Scoring Learning Objectives Define a variable Understand the.
Input, Output and Variables GCSE Computer Science – Python.
Scratch Programming Cards
BIT116: Scripting Lecture 05
Do you remember how to change from a mixed number to an improper fraction? = 11 2 = 30 7 = 52 5 =
Precedence Operators Error Types
Day 1:Five minute check 3 - 4
Coach Baker 7th Grade Math
Complex Conditionals Human languages are ambiguous
Click the mouse button or press the Space Bar to display the answers.
Properties of Arithmetic
Madlib-Input, Strings, and Lists in Scratch
Spanish Mad libs with Scratch
Solving Two- Step Equations
Dependent and Independent variables explained
Exploring Computer Science Lesson 4-10 – Part 1
Teaching design techniques to design efficient solutions to problems
To write a Python program, you first need to open Pyscripter
Solving Two- Step Equations
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Learning Objective LO: We’re learning to understand when it is appropriate to use particular data types.
BODMAS.
Sign Up Here.
Fraction Fun.
Language Basics.
Properties of Addition & Multiplication
Properties of Addition & Multiplication
Lecture Notes 8/24/04 (part 2)
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Introduction to TouchDevelop
Introducing Variables to store information?
An intro to programming concepts with Scratch
Mean, Median, and Range Obj. 5b.
Fractions and Mixed Numbers
Section 6.6 Percents and Equations
Algebra
Solving Equations with Variables on Both Sides 4:3
CST-115 Introduction to Computer Programming
Solving Multi-Step Equations
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Solving Multi-Step Equations
Solving Multi-Step Equations
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Solving Multi-Step Equations
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
We’ve reached second semester! Welcome back!
Module 5 ● Vocabulary 1 a sensing block which will ask whatever question is typed into the block and display an input text box at the bottom.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Multiplying Fractions: Visual Fraction Models
Fractions.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Exploring Computer Science Lesson 4-8
Exploring Computer Science Lesson 4-10 – Part 1
Presentation transcript:

Asking Questions in BYOB Scratch

What is a variable? A variable is the way a computer remembers information. If you want the computer to remember something, you create a variable. Use simple, meaningful names. For example: if I want the computer to remember my name I’d create a variable called name. If I want it to keep track of points I earned in a game I could make a variable called score.

Special variables BYOB Scratch comes with some ready-made variables you can use. These are called system variables. Things like x-position and y-position of a Sprite

Making variables You can make a variable that only 1 sprite can access, or you can make variables that are accessible to every sprite in the program. You have to decide when you create the variable which kind you want.

Answer There is a system variable available in BYOB Scratch named answer that holds the answer to any question you ask of your user. <-- This is where you get the ask and answer blocks.

Asking questions The program below asks for a name and then greets the user by name. When you want to display an answer, you join it with words and the variable part will change with the user's answer. Answer is a fill-in-the-blank variable. This code will say "Hello Joe, how are you?" to Joe and "Hello Aliyah, how are you?" to Aliyah.

Join The more fill-in-the-blanks you have to say, the more joins you need to use The answer variable changes every time, but the words “Hello” and “, how are you?” will always stay the same. So 1 join block lets you choose 2 things to join, 2 joins put 3 separate things together.

Doing math You can build equations using the Math blocks You can use + - * (times) /(divide) This program will say how many days are in a given number of weeks

pseudocode The pseudocode for this program is: When the program starts The sprite asks for the temperature in fahrenheit Subtract 32 from the answer, multiply by 5 then divide by 9 The sprite says “That is “ ______ “degrees celcius” (filling in the blank with the converted temperature)

Here are some answers The order is a little mixed up