© A+ Computer Science -

Slides:



Advertisements
Similar presentations
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Advertisements

Programming Concept #2 Iteration. Is just a fancy way of saying that you would like something to repeat more than one time. It is used in any modern programming.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
Scratch Programming Session 9 of 10 Review elements to use in stories, games, etc.
New Mexico Computer Science For All More Looping in NetLogo Maureen Psaila-Dombrowski.
Simple Python Loops Sec 9-7 Web Design.
INTRODUCTION TO THE SCRATCH PROGRAMMING ENVIRONMENT.
COMP 1001: Introduction to Computers for Arts and Social Sciences Programming in Scratch Monday, May 16, 2011.
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.
Timers Exploring Computer Science Lesson Objectives The students will be able to: Create a timer.
Institute for Personal Robots in Education (IPRE)‏ CSC 170 Computing: Science and Creativity.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech May 2011.
WHAT IN THE WORLD IS SCRATCH??? AN INTRODUCTION TO COMPUTER PROGRAMMING By MD Showman.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
24 Background Building 25 Computing Terminology, and Speed/Velocity Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,
Using MIT Scratch for Programming and Control Exercise 1 Creating movement Year 11 DTG 2012.
© A+ Computer Science - Until I can hear the song Make it louder Loops repeat as long as something is true.
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
Introduction to Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
Intro CS – Loops, making animations & films Lesson Plan 3.
Decision Making: while loops and Boolean Logic. While Loops A while loop is a structure within ROBOTC which allows a section of code to be repeated as.
Sensor Information: while loops and Boolean Logic.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
THE MOUSE Left Click THE MOUSE Right Click.
FOP: While Loops.
Programming & Scratch.
Scratch for Interactivity
Intro CS – Loops, making animations & films
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.
© A+ Computer Science -
Exploring Computer Science Lesson 4-13
Scratch: iteration / repetition / loops
Programming Scratch to Control a K’NEX Fairground Ride
Unit 2 Getting Started With
Diamond Hunt Mock Programming Project.
Control Structures
Scratch – Simple Programming
Loopy Motion Control.
LESSON 11 – WHILE LOOPS UNIT 5 – 1/10/17.
CPS120: Introduction to Computer Science
While Loops and If-Else Structures
Introduction to pseudocode
Scratch – Simple Programming
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Line Following Behavior
Recap the basics Lesson 1.
Using the sensor Lesson 5.
Hour of Code.
Go to =>
Moving Sprites in Scratch
Exploring Computer Science Lesson 4-13
Repetition In today’s lesson we will look at:
While Loops and If-Else Structures
ICT Programming Lesson 3:
Scratch Summer Session 2
Building a Game in Scratch
Exploring Computer Science Lesson 4-12
Recap the basics Lesson 1.
Using the sensor Lesson 5.
If-Statements and If/Else Statements
Exploring Computer Science Lesson 4-13
Creating a Simple Game in Scratch
How to allow the program to know when to stop a loop.
Exploring Computer Science Lesson 4-12
Whole Number Mental Add and Subtract
Whole Number Mental Add and Subtract
Whole Number Mental Add and Subtract
Exploring Computer Science Lesson 4-10 – Part 1
Whole Number Mental Add and Subtract
Presentation transcript:

© A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com What is a LOOP? © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com the loop Until I can hear the song Make it louder Loops repeat as long as something is true If statements are just simple decision-making statements. A condition is checked and something may or may not happen based on the evaluation of that condition. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com the loop As long as I am hungry I eat something While I have pretzels I eat one If statements are just simple decision-making statements. A condition is checked and something may or may not happen based on the evaluation of that condition. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com Loop Demonstration loop if ( student is hungry and more pretzels left ) { student will eat 1 pretzel stick } condition © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com Loops are used to repeat a command or set of commands forever or for a set number of times. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com When the green flag is clicked, the Bug will say "looping" for 2 seconds and then wait 2 seconds before saying it again. This loop will run forever. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com open loop_one.sb © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com When the green flag is clicked, the Bug will say "looping" for 2 seconds and then wait 2 seconds before saying it again. This loop will run 5 times and then stop. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com open loop_two.sb © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com What is an If? © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com the if statement if I am hungry I eat something if I am tired I go to sleep If statements are just simple decision-making statements. A condition is checked and something may or may not happen based on the evaluation of that condition. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com the if statement if it is dark I turn a light on if I can’t hear the song I make it louder If statements are just simple decision-making statements. A condition is checked and something may or may not happen based on the evaluation of that condition. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com When the green flag is clicked, the Bug will say ouch each time it is clicked with the mouse. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com open if_one.sb © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com When the green flag is clicked, the Bug move back and forth across the screen. He will say Wow and Yahoo if he is at a certain position on the screen. © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com open if_two.sb © A+ Computer Science - www.apluscompsci.com

© A+ Computer Science - www.apluscompsci.com Complete a Scratch Lab. © A+ Computer Science - www.apluscompsci.com