<< Chapter < Page Chapter >> Page >
The purpose of this module is to teach you how to use the forever block and the repeat until block to create loop structures in Scratch 2.0.

Table of contents

Preface

Scratch 2.0 (released May 9, 2013) is the second major version of Scratch to be released during the life of the product. Among other things, it features a redesigned editor andwebsite, and allows you to edit projects directly from your web browser.

This module (tutorial) is one in a collection of modules designed to help beginners of all ages (8 and up) learn how to create the code for computer programs using Scratch 2.0 . Information is provided not only for the beginners themselves but also for theirparents and teachers where appropriate.

The purpose of this module is to teach you how to use the forever block and the repeat until block to create loop structures in Scratch.

In this module, I will present and explain three Scratch programs. One program uses a forever block along with an if block to cause a sprite to move in a small circle while the space bar is pressed. Youwill learn that it is not possible to connect another block to the bottom of a forever block. Therefore, if you use a forever block, it must be the last block in the script in which it is contained.

The second program uses a forever block along with an if block to create a counter loop. That program will be used as the jumping-offpoint for a discussion of the similarities and differences between a forever block and a repeat block.

The third program uses a repeat until block to cause a sprite to run in a small circle until the user presses the space bar. Unlike the forever block, it is possible to connect another block to the bottom of a repeat until block. Therefore, it is not necessary for a repeat until block to be the last block in a script.

Finally, I will provide the specifications for a student-programming project for you to demonstrate your understanding of what you learned from the threeprograms listed above and from earlier modules.

Questions & Answers

how did the oxygen help a human being
Achol Reply
how did the nutrition help the plants
Achol Reply
Biology is a branch of Natural science which deals/About living Organism.
Ahmedin Reply
what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
what is biology
Hajah Reply
cell is the smallest unit of the humanity biologically
Abraham
what is biology
Victoria Reply
what is biology
Abraham
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Teaching beginners to code. OpenStax CNX. May 27, 2013 Download for free at http://cnx.org/content/col11498/1.20
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Teaching beginners to code' conversation and receive update notifications?

Ask