Skip to main content
Junior Coding Basics Badge Activity | Girl Scouts
Home Home Home
Home Home Home
Search Search
  • SHOP
  • DONATE
  • myGS myGS myGS
  • Find a Council Find a Council Find a Council
  • Español Español Español
  • Search Search
  • Discover Discover

    About Us About Us

    • What Girl Scouts Do What Girl Scouts Do
    • The Family Experience The Family Experience
    • Girl Scout History Girl Scout History
    • Research and Data Research and Data
    • Diversity, Equity, and Inclusion Diversity, Equity, & Inclusion
    • test test
    • 7th item 7th item

    Activity Zone Activity Zone

    • Explore Girl Scouts Explore Girl Scouts
    • Grade Levels Grade Levels
    • National Service Projects National Service Projects
    • Virtual Events Calendar Virtual Events Calendar

    Our Stories Our Stories

    • Girl Scout Stories Girl Scout Stories
    • Alum Stories Alum Stories

    Discover Girl Scouts. Learn what Girl Scouts do; about our history, research and data; and about family involvement, or try Girl Scout activities!

  • Get Involved Get Involved

    Become a Girl Scout Become a Girl Scout

    • Join a Troop Join a Troop
    • Find Events Find Events

    Become a Volunteer Become a Volunteer

    • Start a Troop Start a Troop

    Alums Alums

    • Campfire Chats Campfire Chats
    • Beyond Ambassadors Beyond Ambassadors
    • Campus Girl Scouts Campus Girl Scouts
    • The Girl Scout Network The Girl Scout Network
    • Noteworthy Alums Noteworthy Alums

    Learn how to get involved with Girl Scouts. Join a troop, find events, become a volunteer, or discover alum opportunities.

  • Cookies Cookies

    Buy Girl Scout Cookies Buy Girl Scout Cookies

    • Frequently Asked Questions FAQs

    Girl Scout Cookie Flavors Girl Scout Cookie Flavors

    • NEW! Raspberry Rally NEW! Raspberry Rally

    About Girl Scout Cookies About Girl Scout Cookies

    • Cookie History Cookie History

    Find out how to buy Girl Scout Cookies, explore Girl Scout Cookie flavors, see how girls learn essential life skills, and more.

  • Support Us Support Us

    Donate Now Donate

    • Individual Giving Individual Giving
    • National Trefoil Society National Trefoil Society
    • Lifetime Membership Lifetime Membership
    • Our Partners Our Partners
    • Planned Giving Planned Giving

    Advocacy Advocacy

    • Girl Scout Advocacy Center Girl Scout Advocacy Center
    • Policy Agenda Policy Agenda
    • Gold Award Recognition Gold Award Recognition
    • Fair Play, Equal Pay Fair Play, Equal Pay

    Support Girl Scouts by donating nationally or to your local council, becoming a lifetime member, and advocating for girls.

  • Members Members

    For Girl Scouts For Girl Scouts

    • Badges, Journeys, & Awards Badges, Journeys, & Awards
    • Ways to Participate Ways to Participate
    • For Cookie Sellers For Cookie Sellers
    • Uniforms Uniforms
    • Renew Your Membership Renew Your Membership

    For Volunteers For Volunteers

    • Tips for Troop Leaders Tips for Troop Leaders
    • Volunteer Cookie Resources Volunteer Cookie Resources
    • Traditions & Ceremonies Traditions & Ceremonies
    • Virtual Meeting Planning Virtual Meeting Planning
    • Renew Your Membership Renew Your Membership

    For Parents & Families For Parents & Families

    • Raising Awesome Girls Raising Awesome Girls
    • Family Connection Family Connection
    • Cookie Entrepreneur Family Pin Cookie Entrepreneur Family Pin

    Resources for Girl Scout members. Find volunteer, Girl Scout, and family tools and support. Explore badges, activities, and more.

  • SHOP
  • DONATE
  • myGS myGS myGS
  • Find a Council Find a Council Find a Council
  • Español Español Español
  • Search Search

Council Finder

Use this finder to connect with your local Girl Scout council. (Home Page)

By ZIP Code 2

By State 2

By Council 2

close
You are leaving uat.girlscouts.org for a website operated by an external party. You will be subject to the privacy and security policies of that website.
  1. Activities for Girls
  2. Juniors
  3. Junior Coding Basics Badge Activity

Juniors

toggle arrow
  • Daisies
  • Brownies
  • Juniors
  • Cadettes
  • Seniors
  • Ambassadors
  • All Levels and Ages

STEM

Junior Coding Basics Badge Activity

Create a Handshake with Code

Explore algorithms and create your own handshake algorithm with nested loops.

Activity Details

Time needed: 20 minutes

Materials needed:

  • Looping Handshake Algorithm handout
  • Paper
  • Pen or pencil

Setup:

Have you ever read the directions on a shampoo bottle? They often say, “Apply shampoo to your hair. Lather, rinse, repeat.” “Lather” means “rub the shampoo around in your wet hair to make lots of bubbles.” “Rinse” means “use lots of water to wash the bubbles out.” And “repeat” means “do it all again!”

“Lather” and “rinse” are the steps in a hair-washing algorithm. An algorithm is a set of step-by-step instructions for how to do something. “Repeat” is a loop. It means “do the same step of the algorithm—lather and rinse—over and over again.”

“Lather” is a nested loop, because you need to rub the shampoo around on your head in lots of different places—on the top, on both sides by your ears, and in the back. You repeat—or loop—the process of lathering. That repeated action happens within the loop of washing your hair twice.

Programmers use loops to tell computers to repeat actions in their programs. Loops make programs shorter, easier to write, and easier for computers to understand.

Activity:

For this activity, find a partner and use loops to create your own secret handshake.

First, follow the Looping Handshake Algorithm handout to do a fun handshake with your partner and see a loop in action! In the algorithm, the yellow shape says, “repeat two times.” This means you should repeat the actions inside of it two times. It’s a loop!

Then, decide with your partner about what kind of BFF handshake you want to make. Your handshake needs to use at least one loop to repeat at least one action. Write down your handshake, step by step, to create your own handshake algorithm.

Once you have an algorithm, test it out! Then, add more motions to your handshake algorithm, putting loops inside of other loops to create nested loops.

For example: If you want to repeat high-five, snap, snap, snap twice, use a loop for the three snaps and another loop to repeat the whole thing twice, like this: repeat twice (high-five repeat three times (snap)).

After you add nest loops to your algorithm, test it again.

And that’s it! Share your handshake algorithm with other people so they can join in the fun. Now you also know how to create an algorithm for something you can do every day!

downloadDownload the Badge Requirements


Troop Leaders: The instructions for all badge steps are available free of charge in the Girl Scout Volunteer Toolkit.

Girl Scout Activity Zone activities have been adapted from existing Girl Scout programming.

Adapted from Step 2 of the Junior Coding Basics badge. 

Explore more activities.

Observe with Detail and Precision
Observe with Detail and Precision

Explore how scientists use observation to learn about our world.

Explore Businesses you Like
Explore Businesses you Like

Girls explore business ideas they might like to start one day.

Be A Community Hero
Be A Community Hero

Think like an entrepreneur, solve a problem.

JOIN
VOLUNTEER
DONATE
Enter your email address to subscribe to
the Girl Scouts of the USA newsletter.
Enter your email address to subscribe to
the Girl Scouts of the USA newsletter.

  • Instagram
  • Twitter
  • LinkedIn
  • Youtube
  • Pinterst
  • Facebook
  • Blogger
  • External Link
  • Contact Us
  • Visit Us
  • Careers
  • Leadership
  • Schools
  • Scholarships
  • Sustainability
  • Financials
  • Faith
  • Terms and Conditions
  • Privacy Policy
  • Frequently Asked Questions
  • Press
  • Blog

© 2016-2022 Girl Scouts of the United States of America. 

A 501(c)(3) Organization. All Rights Reserved.

Join

Volunteer

Donate

close