# Code Flow

In this lesson you will learn to use loops and logical conditions to make choices.

To complete these lessons, you should:

  • Visit your Github account on Github.com (opens new window)
  • Look for the Repository named Level0-Module0
  • Click on the green "Code" button.
  • Select the "Codespaces" tab
  • If you have a Green button that reads "Create codespace on main", click on it
  • If you don't have that green button, you have a running code space. Either open the window where it is running, or click on the name of the code space in the popup window.

# Robot Square

View Source View Source


square image

# Goal:

Use a loop to draw a square using a Robot.

# Steps:

  1. Find the RobotSquare recipe program ( RobotSquare.java ) and open it using Eclipse.
  2. Follow the instructions in the program to help you make a Robot draw a square.

# Robot Spiral

View Source View Source


spiral image

# Goal:

Use a loop to draw a spiral pattern using a Robot

# Steps:

  1. Find the RobotSpiral recipe program ( RobotSpiral.java ) and open it using Eclipse.
  2. Follow the instructions in the program to help you make a Robot draw a spiral pattern.

# Pentagon Crazy

View Source View Source


pentagon image

# Goal:

Use int variables in a loop to draw a pentagonal pattern using a Robot

# Steps:

  1. Find the Pentagon Crazy recipe program ( PentagonCrazy.java ) and open it using Eclipse.
  2. Follow the instructions in the program to help you make a Robot draw a pentagonal pattern.

# Flaming Ninja Star

View Source View Source


Flaming Ninja Star image

# Goal:

Use int variables in a loop to draw a flaming ninja star.

# Steps:

  1. Find the Flaming Ninja Star recipe program ( FlamingNinjaStar.java ) and open it using Eclipse.
  2. Follow the instructions in the program to draw the star.
  3. The first time you run the program, it should look like this
  4. After you add the color, it should look like this
  5. Using a loop to repeat the pattern, the flaming star will be complete.