ScratchData LogoScratchData
Back to Paddle2SeeFixIt's profile

Matching a List Item

PAPaddle2SeeFixIt•Created March 21, 2009
Matching a List Item
0
0
67 views
View on Scratch

Description

To answer a forum question. Type in the name of an animal and then press Space. The smart cat will tell you the favorite food of the animal. The way it works: As you type, letters are added to the Search Animal variable (with spaces in between because of the way List concatenation works). When you press space, the project loops through the Animals list looking for a match with the Search Animal variable. It uses the variable Index to keep track of which list element it is currently looking at. If a match is found, the favorite food is gotten from the Favorite Food list by using the value of Index.

Project Details

Project ID462018
CreatedMarch 21, 2009
Last ModifiedMarch 21, 2009
SharedMarch 21, 2009
Visibilityvisible
CommentsAllowed