Search this site
Embedded Files
Skip to main content
Skip to navigation
Sphero Loops
Your challenge
What You Should Know
Do It!
Sphero Loops
Your challenge
What You Should Know
Do It!
More
Your challenge
What You Should Know
Do It!
Do It!
Watch the Video to code your Sphero
Refactoring With Loops
Now let's
refactor
your code so that it draws a square using a loop.
Refactor
is a common term used by developers that means to improve the way your code is written while still making sure it performs that same action.
You will use a loop to repeat any repeated actions in your original code. A loop repeats a series of blocks as many times as you want.
Why would this be useful?
How do loops make it easier to create a shape with five sides, ten sides, or even 100 sides?
Watch the video below for guided instructions.
Report abuse
Page details
Page updated
Report abuse