Skip to main content
Ambassador Coding Basics Badge Activity
Home Home Home
Home Home Home
Search Search
  • SHOP
  • DONATE
  • MyGS MyGS MyGS
  • Order Cookies Order Cookies Order Cookies
  • Events Events Events
  • Program Guide Program Guide Program Guide
  • Search Search
  • Contact Us Contact Us Contact Us
  • Discover Discover

    About Girl Scouts About Girl Scouts

    • What Girl Scouts Do What Girl Scouts Do
    • Our Program Our Program
    • Ways to Participate Ways to Participate

    Our Council Our Council

    • Our Properties Our Properties
    • Publications Publications
    • Board of Directors Board of Directors
    • Staff Directory Staff Directory
    • Belonging Belonging

    Explore Explore

    • Events Events
    • Event Calendar Event Calendar
    • Camp & Outdoors Camp & Outdoors
    • Shop Shop

    Discover your local Girl Scout council: about Girl Scouts, what they do, what activities are available locally, and how to contact us.

  • Get Involved Get Involved

    Become a Girl Scout Become a Girl Scout

    • Join a Troop Join a Troop
    • Find a Troop Find a Troop
    • Go Solo Go Solo

    Become a Volunteer Become a Volunteer

    • Start a Troop Start a Troop
    • Background Checks Background Checks

    Financial Aid Financial Aid

    • Learn About Financial Aid Learn About Financial Aid
    • Apply for Financial Aid Apply for a Financial Aid

    Learn how to get involved with Girl Scouts: join a troop, go solo, or become a volunteer.

  • Programs Programs

    Girl Scout Cookies Girl Scout Cookies

    • For Cookie Sellers For Cookie Sellers
    • Cookie Manager Manual Cookie Manager Manual
    • Digital Cookie Digital Cookie
    • Cookie CEO Cookie CEO
    • Cookie Forms & Documents Cookie Forms & Documents
    • Volunteer Cookie Resources ABC Volunteer Cookie Resources ABC
    • Find Cookies Find Cookies
    • Cookie Flavors Cookie Flavors

    Snacks & More Program Snacks & More Program

    • Explore Snacks & More Explore Snacks & More

    Camp Camp

    • Frias Frontier Frias Frontier
    • Camp History Camp History
    • Reserve Our Property Reserve Our Property
    • Meet Our Herd Meet Our Herd
    • Day Camp Ducktail Day Camp Ducktail

  • Support Us Support Us

    Donate Locally Donate Locally

    • Fundraising Events Fundraising Events
    • Our Supporters Our Supporters
    • Lifetime Membership Lifetime Membership
    • Planned Giving Planned Giving

    Legacy Legacy

    • Alum Alum

    Corporate Giving Corporate Giving

    • Gift of Caring Gift of Caring
    • Care to Share Care to Share

    Support Girl Scouts by donating locally, becoming a lifetime member, or joining the Girl Scout Network for alums and supporters.

  • Members Members

    For Girl Scouts For Girl Scouts

    • Renew Your Membership Renew
    • Badges and Awards Badges and Awards
    • Highest Awards Highest Awards
    • Scholarship Opportunities Scholarship Opportunities

    For Volunteers For Volunteers

    • Forms and Documents Forms and Documents
    • Troop Leader Blueprint Troop Leader Blueprint
    • Volunteer Events Volunteer Events
    • Volunteer Essentials Volunteer Essentials
    • Girl Scout Experience Box Girl Scout Experience Box

    For Parents & Families For Parents & Families

    • How to Get Involved How to Get Involved
    • Background Check Info Background Check Info
    • Military Families Military Families

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

  • SHOP
  • DONATE
  • MyGS MyGS MyGS
  • Order Cookies Order Cookies Order Cookies
  • Events Events Events
  • Program Guide Program Guide Program Guide
  • Search Search
  • Contact Us Contact Us Contact Us

Council Finder

Use this finder to connect with your local Girl Scout council.

By ZIP Code

By State

By Council

close
You are leaving girlscouts.org for a website opened by an external party. You will be subjected to the privacy and security policies of the website
  1. Discover
  2. Our Council
  3. Our Program
  4. Grade Levels
  5. What Seniors and Ambassadors do
  6. Ambassador Coding Basics Badge Activity

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.

 

Support Students and Schools
Support Students and Schools

Support students and schools as part of the Global Action Days

Videos to Persuade
Videos to Persuade

Make a public service announcement (PSA) or a vlog for your community.

Create Lasting Solutions
Create Lasting Solutions

Create solutions to the new and ever-changing obstacles that arise.

JOIN
VOLUNTEER
DONATE
  • Instagram
  • Twitter
  • LinkedIn
  • Youtube
  • Pinterst
  • Facebook
  • Contact Us
  • Events
  • Visit Us
  • Careers
  • Schools
  • Staff Directory
  • Terms and Conditions
  • Privacy Policy

© 2025 Girl Scouts of Southern Nevada

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

Join

Volunteer

Donate

close