walters.john56
walters.john56 1d ago • 0 views

Using the Python `print()` function for simple output: A Grade 1 Computer Science Lesson

Hey there! 👋 Let's learn how to make your computer say things using Python! We'll be using something called the `print()` function. It's super easy, I promise! Think of it like teaching your computer to talk. 🗣️
💻 Computer Science & Technology
🪄

🚀 Can't Find Your Exact Topic?

Let our AI Worksheet Generator create custom study notes, online quizzes, and printable PDFs in seconds. 100% Free!

✨ Generate Custom Content

1 Answers

✅ Best Answer
User Avatar
lindsey331 Dec 30, 2025

📚 Introduction to the `print()` Function

The print() function is a fundamental tool in Python for displaying output to the user. It's like telling the computer to show something on the screen.

🎯 Learning Objectives

  • ✏️ Understand the basic syntax of the print() function.
  • 💻 Use print() to display simple text.
  • 🔢 Use print() to display numbers.
  • ➕ Combine text and numbers in a single print() statement.

📃 Materials

  • 💻 A computer with Python installed.
  • ⌨️ A text editor or Integrated Development Environment (IDE) like VS Code or Thonny.

🔥 Warm-up (5 mins)

What is Output? Output is information that a computer gives back to us. When you type something and see it on the screen, that's output!

Brainstorm: Think of three things you want your computer to say.

👨‍🏫 Main Instruction

  1. ✍️ Basic Syntax

    The basic syntax of the print() function is:

    print("What you want to say")

    The text you want to display goes inside the parentheses () and is enclosed in quotation marks "".

  2. 💬 Displaying Text

    To display the text "Hello, world!", you would write:

    print("Hello, world!")

    When you run this code, "Hello, world!" will appear on the screen.

  3. 🔢 Displaying Numbers

    You can also display numbers using the print() function:

    print(42)

    This will display the number 42 on the screen. Notice that numbers don't need quotation marks.

  4. ➕ Combining Text and Numbers

    To combine text and numbers, you can use commas , inside the print() function:

    print("The answer is", 42)

    This will display "The answer is 42" on the screen.

  5. ✨ Using Variables

    First, create a variable:

    my_name = "Your Name"

    Then, print it!

    print("Hello,", my_name)

📝 Assessment

Let's check what you've learned.

  1. 🖥️ What is the output of print("Python is fun!")?
  2. 🔢 What is the output of print(100)?
  3. ➕ What is the output of print("The number is", 5)?
  4. 💬 Write a line of code that prints your name.
  5. ➕ Write a line of code that prints "I am" followed by your age.
  6. ➕ What will print("1 + 1 =", 1+1) output?
  7. 💡 Explain, in your own words, what the print() function does.

Join the discussion

Please log in to post your answer.

Log In

Earn 2 Points for answering. If your answer is selected as the best, you'll get +20 Points! 🚀