Scratch Programming Lesson 4 Question asking and answering.

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
SCRATCH Lesson Two – Interactive Concepts Using Sensing, Operators, and Variables.
Microsoft® Small Basic
ABNIAC The following slide presentation is to acquaint the student with ABNIAC. The version used for presentation is the Java version, which can be found.
Harry Potter Scratch Game
Adventures in Animation Harry Potter Game Pranali Choubal Kunal Shaw Barb Ericson Dec 2007.
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
Scratch Programming Session 9 of 10 Review elements to use in stories, games, etc.
1 An introduction to programming concepts with Scratch (in 5 hours + homework)
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech June 2011.
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
The Scratch Calculator You are all going to be real computer programmers!!!
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
Ms. Deveny Second Semester  Introductions  Interview your table partner  Name  Why taking CPD  Computer experience  Favorite game?
SPELLING GAME PROJECT SAMPLE ASSESSMENT MATERIAL GCSE Computing.
Python Programming Using Variables and input. Objectives We’re learning to make use of if statements to enable code to ask questions. Outcomes Build an.
Section 3 Calculations National 4/5 Scratch Course.
Programming & Scratch. Programming Learning to program is ultimately about learning to think logically and to approach problems methodically. The building.
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.
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
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.
Learning the skills for programming Advanced Visual Programming.
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Scratch Programming Lesson 2 First glance to programming logic.
Introduction to Programming G50PRO University of Nottingham Unit 2 : Introduction To Scratch Paul Tennent
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.
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.
22/11/ Selection If selection construct.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Algorithms Writing instructions in the order they should execute.
Scratch Programming Lesson 3 Create a story. We are going to learn… How to change the background How to use the “say” and “think” bubbles How to change.
INTRODUCTION TO PROGRAMMING. Program Development Life Cycle The program development life cycle is a model that describes the stages involved in a program.
Marble Racer. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
31/01/ Selection If selection construct.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Computer Science 1000 Algorithms III. Multiple Inputs suppose I ask you to write a program that computes the area of a rectangle area = length * width.
Scratch Programming Lesson 1 Moving objects with sound and changing colours.
IST 210: PHP LOGIC IST 210: Organization of Data IST210 1.
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech.
Introduction to Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
Introducing Scratch Learning resources for the implementation of the scenario
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Scratch Programming Cards
Programming & Scratch.
Madlib-Input, Strings, and Lists in Scratch
Scratch 7B IT1.
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Chapter 3: Variables, Functions, Math, and Strings
Exploring Computer Science Lesson 4-10 – Part 1
Scratch – Simple Programming
Introduction to Object-Oriented Programming
Use proper case (ie Caps for the beginnings of words)
Scratch – Simple Programming
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Lesson 1 Introduction to Scratch Basic blocks
(More) Basic blocks Broadcasting messages
Lesson Objectives To understand how to make sprites interact
Game Over Module 4 Lesson 2.
Hardware is… Software is…
Scratch 7B IT 1.
Exploring Computer Science Lesson 4-10 – Part 1
Presentation transcript:

Scratch Programming Lesson 4 Question asking and answering

We are going to learn… How to ask a question and receiving answer First touch of variable – answer Creating variables How to use If….. Else loop…. Forever IF vs. If Broadcast

Question asking and receiving answer Input answer here The answer will be stored in the “answer” variable

Variable What is variable? A storage location of some value or words is a variable When we ask more than one question, the latest one will over-write the previous one More variables are needed for storage

Creating variables Click here to create a new variable This box will pop-out and name should be given to the variable Choose the target user of the variable

How to use variable To control whether the variable will be displayed on the stage Give a value to the variable Change the value of a variable by a certain number

Operators (Part I) Addition, Subtraction, Multiplication and Division Smaller than, equal to OR greater than String- a sequence of characters String functions, 1) Join two strings together 2) Select one letter from the string depending on the position of the letter 3) Return the length of the string

If… else If the operation in returns a TRUE value, the commands here will start to run. If the operation in returns a FALSE value, the commands inserted here will start to run.

Forever If vs. If Forever If ▫Non-stop to check the condition If ▫Just check the condition once

Forever If vs. If Once the green flag is pressed ▫Would play meow sound whenever the mouse point to the sprite Would play meow sound only when the mouse point at the time and the green flag is pressed at the same time

Broadcast Generate a message to the program Set an object ( actor / background) to response when a message is broadcast by others

How to use Broadcast The sprite gives a broadcast signal: change The stage changes to another background when receive the “change” signal

Task of the lesson Start a new program In this program, the sprite can help you calculate 3 questions The green flag will be the program starter Input: ▫Tell the user that you are going to help them in ▫Allow the user to input 2 numbers, one by one Output: ▫Return “Correct!” if you have the correct answer and change to another background with a background music ▫Return “Wrong!, the answer is ___” to return the correct answer to the user ▫The outputs will be displayed 2-3 seconds Save your program and upload as Program4_3_ _ _ in eclass