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

Seniors

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

STEM

Senior Coding Basics Badge Activity

Write Pseudocode to Create a Portrait

Use pseudocode to create a portrait of yourself or someone you admire.

Activity Details

Time needed: 30 minutes

Materials needed:

  • Code a Portrait handout
  • Marker, pen, or pencil
  • Paper

Setup:

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! 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. Sequence is the order in which the computer performs the steps of the algorithm.

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! Use code to create an algorithm for a portrait of yourself or someone you admire. Then give the algorithm to someone else, who will use the coded algorithm to draw the portrait.

Note: If you don’t have a partner for the activity, that’s okay! You can test your own algorithm and create a portrait on your own.

First, check out page 1 of the Code a Portrait handout. Make sure you understand what functions are and how to write them with the correct syntax. Look at the examples that work as well as those that don’t!

Then, create a short program in pseudocode with three or more tasks (functions). Together, the functions should make up an algorithm that could tell someone how to draw a smiley face. It may help to ask yourself:

  • What shapes do you need to make a smiley face?
  • What are the steps you would use to tell someone how to draw a smiley face?
  • Is there more than one way to do it?
  • Does the order of steps matter?
  • Is the size or placement of the shapes important?

Then, use functions to write pseudocode someone else could follow to draw a portrait of you or someone you admire. The “Portrait Function List” on the Code a Portrait handout has some examples of functions, or you can create your own (as long as they’re in the correct syntax!). 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 give any additional instructions!

After you’ve written an algorithm, share your pseudocode with someone else who can play the role of a computer, drawing your portrait 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 recreate your portrait.

If the “computer” doesn’t follow the instructions correctly, that’s okay. It might take multiple tries to code the portrait 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!

After the “computer” is done running the program, look at the final image:

  • How close was what you wrote in the program compared with the drawing?
  • How were the code and the drawings alike and different?
  • What might be influencing the differences?
  • What could you add to the code to make it more specific?

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

This activity reminds us how literal computers are. When creating a portrait, the programmer creates the description, and the computer draws the portrait by following that description. Algorithms are helpful because they’re efficient and general—the functions are simple enough to describe one part of the face and can be reused—think of the draw Eye function.

 


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

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

Adapted from Step 1 of the Senior Coding Basics badge. 

Explore more activities.

Short STEM Title
Short STEM Title

Short STEM Description

Short STEM Title
Short STEM Title

Short STEM Description

Girl Scouts Love State Parks Weekend
Girl Scouts Love State Parks Weekend

It’s time to lead the way at your favorite state parks!

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