Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
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.
Create a Simple Game in Scratch
Michael Parkes Dudley LA What can Scratch do? Make simple games, animations, presentations and stories.
Scratch for Storytelling Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
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.
Session 5 of 10 Review + Multiple Sprites
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.
ITEC Winter An intro to programming concepts with Scratch Quick intro for college citizens. George Stockman MSU CSE.
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech June 2011.
Extending the Pong Example Barb Ericson Georgia Tech June 2011.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech Oct 2010.
Scratch Workshop Thursday, August 26, 2010.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
Code Club Session 2 Dance Party. What will we learn ?  How to change the background  How to create animations  How to make objects talk to each other.
THE BIG PICTURE. How does JavaScript interact with the browser?
Section 3 Calculations National 4/5 Scratch Course.
Summer Computing Workshop. Session 2 Input in Scratch  Multi-Character input - This is used when the user is prompted to enter a number or word.  Problems.
Exploring Computer Science 2/23/15 2/23 Develop a Scratch story project -Brainstorming 2/24 Develop a Scratch story project –Developing 2/25 Develop a.
Introducing Scratch the Cat
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.
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.
ACO 101 Making a program. mb_your_brain_on_improv.html mb_your_brain_on_improv.html.
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
1 Understand how to use Scratch to: – Animate a sprite – Add sound to your script – Use the forever command to create a loop Lesson 2: Learning Objectives.
Scratch Programming Lesson 4 Question asking and answering.
A Simple Quiz: Ask User Functions. By Lana Dyck under the direction of Professor Susan Rodger Duke University June 2009, added Part 2 July 2011.
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.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech May 2011.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Introduction to Scratch. What is Scratch? Scratch is a control program that enables you to create your own interactive stories, animations, games, music,
Image #1 Getting Started
Scratch Another computer programming language Developed by MIT in 2003
Making a Sprite Dance Barb Ericson Georgia Tech June 2011.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Drawing with the Pen Barb Ericson Georgia Tech June 2011.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
 SCRATCH is a new programming language that lets you create your own interactive stories, animations, games, music, and art.
Scratch for Interactivity Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
Digital Art in Scratch part 2 Barb Ericson Georgia Tech Nov 2010.
ICT/COMPUTING RULES Only use software allowed by the teacher
Teaching Kids Programming with Chromebook Digital Convergence Lab, NIU.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Introducing Scratch Learning resources for the implementation of the scenario
Review for Final June 13, 2016.
Create a Halloween Computer Game in Scratch
Commands in Scratch.mit.edu
Scratch for Interactivity
Madlib-Input, Strings, and Lists in Scratch
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.
Spanish Mad libs with Scratch
Unit 2 Getting Started With
Getting Started with Scratch
How to Use the Drag & Drop Macro
Scratch for Storytelling
An intro to programming concepts with Scratch
Getting Started with Scratch
Variables & getting info from the user
Image #1 Getting Started
Getting Started with Scratch
Creating a Simple Game in Scratch
Presentation transcript:

Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech

Concepts Strings are groups of characters –You can join two strings together –You need to add spacing between strings Lists – store items in an order –You can add items to a list –You can get an item at a position in a list 9.1 Utilize drag and drop software to develop programs.

Project Description We will ask the user some questions and then create a "madlib" from the answers NOTE: ONLY DO THE THINGS IN BLUE, BUT READ ALL THE WAY THROUGH BEFORE YOU BEGIN

Big Picture Delete the cat sprite Choose a sprite from a file Program the sprite –Create a script –Do set-up –Repeat 3 times Ask user a question Add answer to a list –Create a string to say the result

Delete cat sprite To delete the cat –Click the scissors –Click the cat Or right click on the cat and select delete

Choose a Sprite Select the choose a sprite from a file Go to the People category Pick a sprite to use DO NOT PICK THIS ONE!!

Program the Sprite We want to ask the user 3 questions –Name –Favorite color –Favorite Animal Use the "ask and wait" tile in the Sensing category

Saving the answers Each time we ask a question the answer is put in the answer tile – in Sensing To save the answers let's add them to a list

What is a list? A list holds items in order –You can add items to a list Added at end –You can get an item at a position in the list

Creating a List Go to the Variables category Click on "Make a list" Give your list a name –Like answerList

Set-up and ask questions When the green flag is clicked –Clear the answer list Delete all items from it –Ask each question –Add each answer to the answer list

Displaying the MadLib You can join two strings together –Using join tile from Operators You can get an item from a position in the list

Using multiple joins You can use more than one join

Final Code

Using variables with strings You can make a variable –Like sentence You can set the variable to the result of a join –Remember to include spaces

Assignment Create a longer MADLIB—YOU MUST ADD 3 MORE QUESTIONS, and MADLIB “say” statements to go with them. SAVE AS: MADLIB YOUR NAME Create a personalized story –Add user name and other info to the story Create an interactive story –Let user pick what to do in the story— EXTRA CREDIT

Summary You can ask questions in Scratch –And get the answer NOTE: You can join two strings together –You must add any spacing between strings You can store items in lists –Add, delete, insert, get item at position