Skip to main content
Ambassador 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. Ambassadors
  3. Ambassador Coding Basics Badge Activity

Ambassadors

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

STEM

Ambassador Coding Basics Badge Activity

Translate a Song into Pseudocode

Analyze song lyrics to create an algorithm in JavaScript-style code.

Activity Details

Time needed: 30 minutes

Materials needed:

  • Song Functions handout
  • Paper
  • Pen or pencil

Setup:

Writing songs is a complicated process, but it can be broken into a sequence of steps or an algorithm. An algorithm is a series of specific instructions that can be applied to many situations. For example, a step-by-step recipe or a set of directions from one place to another are two examples of algorithms you might already use!

JavaScript is one of the fundamental programming languages used online. It’s used to make programs interactive. Whenever you do something on a website that’s interactive, such as clicking a button, playing a videogame, or seeing an ad pop up, that code was written in JavaScript. A function is one of the basic building blocks of a program. It’s a type of instruction that’s similar to a verb: a function does something.

When programmers start working on a new idea, they often sketch out their ideas on paper before they move on to coding their algorithms on a computer. Pseudocode is a way to plan a computer program using human-friendly language. It’s not actual coding, but rather a written description of the key elements of an algorithm or program. It’s used as a quick way of thinking about a program without completely writing it out in code. It saves time and still lets a programmer check that their program will run.

Activity:

For this activity, you’re the programmer! Translate a song into a short program of three or more functions to make an algorithm. Then, give the algorithm to someone else who will use it to sing the song.

Note: If you don’t have a partner for the activity, that’s okay! You can follow your coded algorithm to sing the song on your own.

First, check out pages 1 and 2 of the Song Functions handout. Make sure you understand what functions, arguments, and variables are and how to write them with the correct syntax. Look at the examples that work as well as those that don’t!

Next, you’re going to translate a set of song lyrics into code. To get started, choose a song that promotes positive social change. All kinds of music, from folk to hip-hop to rock ’n’ roll to country, have included lyrics that send messages of equality and positive change. For example:

  • You might know songs from the civil rights movement.
  • You might know songs that are famous from history or are newer from current social movements.
  • You might know other songs with a positive message about relationships, self-esteem, or resilience.
  • You might create your own song to promote social change.

Once you’ve chosen a song, write down the lyrics on a sheet of paper and brainstorm how you can translate them into pseudocode:

  • What are the different parts of the song? How many verses are there? What’s the chorus?
  • How can parts of the song become steps in the program?
  • Is there a part that repeats? How might this look in your program?
  • Do different parts of the song look similar? If so, they can use similar code!

Rewrite the lyrics on page 3 of the Song Functions handout, breaking the song into different pieces. Then, translate each part using the sing() function.

As you write your program, make sure to use functions, arguments, and variables. Remember to be as specific as possible—once you hand over your algorithm, the “computer” won’t be able to ask questions and you won’t be able to provide any additional instructions!

After you’ve translated the song, share your program with someone else who can play the role of a computer and sing the song by following the instructions. If you don’t have a partner, that’s okay—just follow your own instructions, step by step, to see if you can sing the song correctly.

If the computer” doesn’t follow the instructions correctly, that’s okay. It might take multiple tries to code the song correctly, so mistakes are to be expected. In computer programming, getting code right is a learning process—you can expect to make mistakes, but also know that you can fix them. In fact, sometimes a mistake leads to unexpected results!

And that’s it! Now that you’ve translated the song into code, you could give the program to someone else (or a computer!) to follow and sing the song.

This activity reminds us how a complex activity, such as writing a song, can be broken down into a sequence of individual actions or an algorithm. Using an algorithm helps because it’s efficient and general. The functions are simple enough to describe one part of the song and can also be reused—think of the sing() function. Once coded, the program can be shared with someone else or run by a computer.


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 1 of the Ambassador Coding Basics badge. 

Explore more activities.

Plan where you’ll live
Plan where you’ll live

Learn about the cost of housing as you imagine being on your own.

Be an Advocate for the Environment
Be an Advocate for the Environment

Learn about a local issue in nature and how to be an advocate for it.

Jump into Citizen Science
Jump into Citizen Science

Take part in a citizen science project and help scientists with their research.

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