Skip Navigation

Code-moji with Python

By Paul Prescod 90 minutes
Grades 9-12
  • Programming
  • Data
  • Design
Tools & Languages

Key Coding Concepts

  • Algorithms
  • Conditional Statements
  • Functions
  • Sequences
  • Variables



A bundle of reusable code that allows a programmer to achieve something that would otherwise be difficult or impossible. In this case, easy graphics programming.



A list of statements that can be invoked repeatedly in a program, perhaps changing its behaviour on the basis of “parameters” that are passed in.



Numbers which represent where on the screen to draw something. X represents horizontal location, Y represents vertical location.



Stores a piece of information i.e. the key that the user just pressed.


RGB Colours

Numbers representing the amount of red, green and blue that a shape should exhibit.

Learn how to use Python and ProcessingPy to make pretty pictures. A good first class on programming and Python.

Can be done in one or two sessions, depending on time available.

Before the lesson…

  • Review key coding concepts and ensure you are confident describing them to your group
  • Familiarize yourself with Trinket and go through the tutorial yourself
  • Optionally: Have the learners log into Trinket using Google Accounts, Clever or Edmodo to save their programs easily


Introduce Trinket to the class as is done in the video above.

Talk with the class about Emojis and different ways that one might create them: with paint programs, by scanning a drawing, or in this case, by writing code for the shapes


Complete the lesson available on Trinket

Make a plan for how to access learners' work in Trinket. You could sign up for Trinket Connect to collect projects, have learners email you class links, or gather project links in a shared Google doc or blog.

Learners can draw any emoji or shape that interests them!

Have learners pair up and write a short story about their emojis using the plot mountain structure.

ProcessingPy Documentation

Teach lessons that are tied to your existing curriculum!


More Lesson Plans For Grades 9-12

    View All Lesson Plans

    Explore lessons based on components

    The K-12 Computer Science Framework

    Although learning how to build digital projects is a key part of Computer Science education, students should also learn a wider set of skills and competencies that will help them to harness the power of digital technologies as both creators and consumers. A comprehensive approach to K-12 Computer Science education includes learning about the following five focus areas:

    View Framework ➝


    By the end of high school, students should be able to create a simple computer program.

    Computing and Networks

    By the end of high school, students should understand and be able to use the tools and devices commonly used to build digital projects.


    By the end of high school, students should be able to explain how we use computers to create, store, organize, and analyze data.

    Technology and Society

    By the end of high school, students should be able to explore the ways in which technology and society have mutually shaped each other.


    By the end of high school, students should be able to apply design principles to the digital projects they create.