Introduction to Programming G50PRO University of Nottingham Unit 2 : Introduction To Scratch Paul Tennent http://paultennent.wordpress.com/G50PRO.html.

Slides:



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

Introduction to Macromedia Director 8.5 – Lingo
Create a Simple Game in Scratch
Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Create a Simple Game in Scratch
Mission Technology Introduction to Scratch! June 2007.
Partners Computer #Partner APartner B 1 Bachmeier, EmilyMuniz, Olivia 2 Betz, MiahRatz, Jordan 3 Brundage, AmandaRipperton, Jacklynn 4 Cretsinger, SierraRundall,
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
Learn… Create… Program. Manipulation of Multiple Media Connects with youth culture Scratch is a new graphical programming language designed to support.
Introduction to Scratch UC Santa Cruz CMPS 10 – Introduction to Computer Science 13 May 2011.
(An Introduction for Programmers)
Introduction to Programming and Physical Computing
Digital Art in Scratch part 1 Barb Ericson Georgia Tech Oct 2010.
Scratch Workshop Thursday, August 26, 2010.
Adventures in Animation Introduction to Scratch! Michelle Venable-Foster June 2006.
What is Scratch? Scratch as Logo Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
Comparing Python and Visual Basic
index.php Palmyra Area High School 1.
INTRODUCTION TO THE SCRATCH PROGRAMMING ENVIRONMENT.
Introduction to.
By Yukyong Chung.  Given the terms of computational concepts, the students will be able to state examples matching the Scratch blocks.  The students.
Introduction to Scratch!
Algorithms In general algorithms is a name given to a defined set of steps used to complete a task. For example to make a cup of tea you would fill the.
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.
Partners Comp# Partner APartner B 1 Ancona, SamanthaManternach, Hailey 2 Black, RyanMcNeil, Maddie 3 Conger, KevinOhland, Rebecca 4 Day, MerciOtterbein,
Introduction to Scratch Scratch as Logo Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
University of Sunderland CIF 102/FIF102 Fundamentals of DatabasesUnit 15 Programming in Microsoft Access using VBA Using VBA to add functionality.
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.
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,
Scratch Another computer programming language Developed by MIT in 2003
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Unit 1 Introduction to Evangel College S.2 ICT.
 SCRATCH is a new programming language that lets you create your own interactive stories, animations, games, music, and art.
1 Understand what Scratch is and what it can be used for Lesson 1: Learning Objectives.
Adventures in Animation Introduction to Scratch! Michelle Venable-Foster Barb Ericson Dec 2007.
ICT/COMPUTING RULES Only use software allowed by the teacher
Computer Programming with Scratch JAOIT 8. Scratch Scratch is a programming language that makes it easy to create your own interactive stories, animations,
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Introducing Scratch Learning resources for the implementation of the scenario
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Review for Final June 13, 2016.
Introduction to Scratch
Unit 2 Technology Systems
Create a Halloween Computer Game in Scratch
Scratch for Interactivity
What is it?! •Scratch is a programming language that allows you to create interactive stories, music, animations, art, games, and more!
Understanding the Geometric Shape Code
Unit 2 Getting Started With
Introduction to.
Learn… Create… Program
Getting Started with Scratch
Learn… Create… Program
Computer Science Core Concepts
MICCA SCRATCH Workshop
Introduction to Snap Programming
Getting Started with Scratch
Learn… Create… Program
Learn… Create… Program
Scratch: Animation and game programming
Creating a Simple Game in Scratch
CSC 221: Introduction to Programming Fall 2018
Presentation transcript:

Introduction to Programming G50PRO University of Nottingham Unit 2 : Introduction To Scratch Paul Tennent http://paultennent.wordpress.com/G50PRO.html paul.tennent@nottingham.ac.uk Room C41

What is Scratch? Scratch is a free programmable toolkit that enables users to create games, animated stories, and interactive art Enables users to share programs over the Internet Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab, with funding from the National Science Foundation, Microsoft, Intel Foundation, Nokia, and the MIT Media Lab research consortia.

Getting Started With Scratch Open new project Choose, create or edit your Sprite Choose your background Write your program

Programming In Scratch Click on the sprite you want to program, and select the “Scripts” tab. The Scripts area is where you “build” your program by using the programming blocks. In the upper, left-hand corner of your Scratch window, you will see 8 buttons . Each of these buttons have programming blocks in those particular areas.

Programming In Scratch To program a sprite, drag blocks from the Blocks Palette to the Scripts Area. To run a block, click on it. Create scripts (programs) by snapping blocks together into stacks. Click anywhere on the stack to run the whole script, from top to bottom

Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high. 180 240 -240 -180

Scratch Blocks Motion Control and Sensing Animate sprites controls how many times an event happens, how long an event happens, or when an event happens. conditional statements (“if statements” or “if-else statements”) Write code so that if the user presses the Space key on the keyboard, the sprite will move 20 steps and change direction.

Scratch Blocks Sound Looks Pen Operators Variables

Starting From Scratch Scratch has all of the common elements used in all programming languages. Conditional statements Loops Variables Events

Branching (Conditional Statements) Make Tea START Is kettle full? Fill kettle yes no Boil Kettle

Conditional Statements If [Boolean] Then Do this Else Do the other

Comparisons == Equals < Less than > More than <= Less than or equal to >= Greater than or equal to != Not equal to

Loops Simplify the coding of repetitive tasks Giving the people in a company a 10% rise Employee 1 salary = 1.1*Employee 1 salary Employee 2 salary = 1.1*Employee 2 salary … Employee 99 salary = 1.1*Employee 99 salary

Loops Simplify the coding of repetitive tasks Giving the people in a company a 10% rise For i = 1 to 99 Employee i salary = 1.1*Employee i salary

Loops There are a lot of different standard types of loop Scratch only has some of them

Flow control Flow control In computer science flow control refers to the order in which the statements or instructions are executed or evaluated. Branches (Conditional Statements) Loops

Variables a variable is a facility for storing data One of the most powerful features of a programming language is the ability to manipulate variables. A variable is a named location that stores a value. Values are things that can be printed, stored or operated on. (numbers, letters, Strings, etc.)

Variables each variable will have Name Value Location in memory X = 100 Y = 20

Assignment statement Declare str str = “Hello” the idea is straightforward: When you declare a variable, you create a named storage location. When you make an assignment to a variable, you give it a value.

BankBalance Payment 700 700 Check Balance 700

Events You can’t run all of the elements of a program at once Things happen when the relevant event triggers them The main event in Scratch is the green flag There are other custom events that you can add

Summary Scratch Programming Blocks Conditional Statements allow us to make decisions about what to do next Loops allow us to perform repetitive tasks Variables record the values and state of elements of a program Events trigger different elements of the program to be run at the correct time