Lesson goal: Counting using for loops (more)

Previous: Using for-loops to count | Home | Next: Make math practice problems

After you understand the basics of the start and end to for loop counting, there is one more option you have to direct the for loop, which is the "step." The step tells the for loop how large its jump should be between successive counts.
for variable=start,end,step do
BODY
end
Move the mouse over a dotted box for more information.

Now you try. Try constructing a for loop that will count and display the count, but add a step so it won't always count by 1.

Type your code here:


See your results here:

Show a friend, family member, or teacher what you've done!

Here is a share link to your code:

Does your code work? Want to run it on your iPhone?

Here's your code:

  1. Use [Control]-[C] (Windows) or [⌘]-[C] (MacOS) to copy your code.

  2. Paste it using [Control]-[V] (Windows) or [⌘]-[V] (MacOS) into this page

  3. Then click the "Use on iPhone" button that you'll see.