Skip to main content

Printing

In the Python programming language (and most other programming languages), “printing” doesn’t literally mean writing something on a sheet of paper. “Printing” means displaying text on the screen.

Dependencies

Students need to have these skills before learning this skill:

Goal

When you teach this skill, your goal is to make it so that a student is able to write code that looks like this:

print("This is my first message.")
print("This is my second message.")
print("This is my third message.")

Activities

Here are some activities that you can do in order to teach this skill.

Dictation

I like using dictation when teaching because it forces students to transform the information in their head. They have to figure out what I mean when I say stuff like “opening parenthesis”. If they don’t know what I mean, then they have to speak up. It’s important for students to learn to speak up when they’re confused and to learn to be comfortable when doing so.

  1. Make sure that students have a Python file open in their IDE.

  2. Tell students that we’re going to learn how to display text on the screen.

  3. Tell students to type the word “print”.

  4. Tell students to type an open parenthesis.

  5. Tell students to type a quotation mark.

  6. Tell students to type a message.

  7. Tell students to type a quotation mark after their message.

  8. Tell students to type a closing parenthesis after that quotation mark.

  9. Ask students what they think their program is going to do.

  10. Have students run their program.

  11. Ask students if their program did what they expected it to.

Copying from the board

  1. Make sure that students have a Python file open in their IDE.

  2. Write this code on the board:

    print("Hello, world!")
  3. Ask students what they think that code will do.

  4. Tell students to type the code that’s on the board on their computers.

  5. Once a student finishes copying the code from the board, tell them to run the code.

  6. Once a student runs their code, ask them if the code did what they expected it to.