ScratchData LogoScratchData
Back to teacherLee's profile

Random Walk - Wrap Around

TEteacherLee•Created May 5, 2023
Random Walk - Wrap Around
1
0
7 views
View on Scratch

Instructions

Check that the random walk does not go off the stage. Sprite goes off to the left ==> reappear at the right edge. Sprite goes off to the right ==> reappear at the left edge. Sprite goes off at the top ==> reappear at the bottom edge. Sprite goes off at the bottom ==> reappear at the top edge. How does the overall result change? Tap the space key to run the program. The sprite starts in the center of the stage. The program draws 1,000 line segments by randomly picking a number 1 through 4 and turning 90 degrees times that number: 1 --> turn 90 degrees, 2 --> turn 180 degrees 3 --> turn 270 degrees, 4 --> turn 360 degrees A color is randomly selected for each segment. The lines may go off the stage. Random Walk Constrained keeps the sprite on the stage.

Project Details

Project ID845962386
CreatedMay 5, 2023
Last ModifiedMay 5, 2023
SharedMay 5, 2023
Visibilityvisible
CommentsAllowed