2-1 Printing in Python
 
Printing in Python - Lesson 2.1

Printing in Python

Lesson 2.1 - Make Your Code Talk! šŸ—£ļø

šŸŽÆ Lesson Objective: Apply the print() command to display customized text messages on the screen

ā±ļø Duration: 45 minutes | šŸ‘„ 7th Grade

ā“ Question of the Day

"Why do you think programmers need to make their programs talk back to users?"

šŸ“ Directions (5 minutes):

  • • Jot down a quick response in your notebook
  • • Turn and talk with a partner about how computers "communicate"
  • • Discuss examples: "New Message," "Upload Complete," "Error: Try Again"

šŸ“± Social Media

  • • "New message"
  • • "Friend request sent"
  • • "Post uploaded"
  • • "No internet connection"

šŸŽ® Games

  • • "Level Complete!"
  • • "Game Over"
  • • "Score: 1500"
  • • "New high score!"

šŸ’» Apps

  • • "Welcome back!"
  • • "Download complete"
  • • "Incorrect password"
  • • "Battery low: 10%"

šŸ“ŗ Activity #1: Direct Instruction (8 minutes)

Watch CodeHS Video 2.1.1: Printing in Python

Click to play video

Open CodeHS Video 2.1.1

šŸ’¬ Discussion Questions:

  • šŸ¤” What does the print() command do?
  • ā“ Why are quotation marks important?

šŸ“ After the video, complete the CodeHS quiz!

šŸ“– Understanding print() in Real Life

What is the print() command?

The print() command tells the computer to display information on the screen. In Python, you use parentheses and quotation marks to show the text you want the computer to "say."

print("Hello, world!")

This command prints exactly what's inside the quotation marks.

šŸ’” Real-Life Connections

When you see text messages or alerts on your phone, those are created using similar print functions in programming languages!

āœ… Display Messages

Instagram and Snapchat: "New message" or "Friend request sent"

šŸ› Debug Code

Calculator app: "Error" when you divide by zero

šŸŽ® Game Messages

"Level Complete!" or "Game Over" from game code

šŸ“± Interactive Programs

Make text-based stories or games more engaging

Without print(), you wouldn't know what your program is doing — it's how your computer "talks back" to you.

šŸŽ¬ Activity #2: Guided Practice (10 minutes)

šŸ‘Øā€šŸ« Teacher Live Demonstration

Follow along with your teacher using these examples:

print('Hello World!')
print('Welcome to Python')

šŸ› Can You Spot the Errors?

Discuss with a partner why these errors occur:

āŒ print(Hello World)

Missing quotation marks!

āœ… print("Hello World")

Correct syntax!

āŒ print("Hello World)

Missing closing quote!

āŒ Print("Hello")

Capital P - Python is case-sensitive!

šŸ“± Interactive App Demo

šŸ“± Phone Screen:

šŸ‘ˆ Click a button to see how print() works in real apps!

šŸ’» Activities #3 & #4: Practice Time!

šŸ‘„ Activity #3: Partnership Practice (7 minutes)

Pair up and create a short Python program introducing yourself!

Your program should print:

  • • Your first and last name
  • • Your favorite subject
  • • Your dream career

āœļø Try It Here:

šŸ“ŗ Output:

Click "Run Code" to see output...

šŸ’” Tips:

  • • Use quotation marks: "text" or 'text'
  • • Use parentheses: print()
  • • Be creative: print('She said, "Python is easy!"')
  • • Test your partner's code!

šŸƒ Activity #4: Independent Practice (10 minutes)

1. Complete CodeHS Lesson 2.1.6: Fix This Program!

2. Create your own "mini-introduction" with at least 3 print statements

3. Add one sentence using both single and double quotes correctly

4. Walk around and have classmates check your code! āœ…

šŸŽ® Activity #5: Kahoot Review (5 minutes)

Question 1: What does the print() command do in Python?

Question 2: Which line of code is correct?

Question 3: What happens if you forget quotation marks?

Question 4: Which symbol is used to print text in Python?

Question 5: Why do programmers use print statements?

šŸŽÆ Exit Ticket - Closure (2-5 minutes)

Complete CodeHS Lesson 2.1.7: Vertical Name Exercise

Submit via CodeHS.com, then take a screenshot and submit via Canvas

Go to CodeHS 2.1.7

🌟 Enrichment Challenge:

Open CodeHS Sandbox and write one print statement about something fun you enjoy in October!

print("In October, I love carving pumpkins and drinking hot chocolate!")

šŸ¤” Reflection Prompts (5 minutes)

1. How does using print() help you understand what your program is doing?

šŸ’­ It shows me the output and helps me check if my code works correctly...

2. Where do you see printed messages in the apps or websites you use?

šŸ’­ Instagram shows "New message," YouTube shows "Next video..."

3. What was one mistake you fixed today, and how did you fix it?

šŸ’­ I forgot quotation marks and got an error. I added them and it worked!

4. How can programmers make their programs more helpful using print()?

šŸ’­ By showing clear messages, instructions, and error alerts to users...

🧩 Standards Alignment

  • āœ“ CSTA 1B-AP-15: Test and debug programs
  • āœ“ CSTA 2-AP-13: Decompose problems into parts
  • āœ“ DoDEA 4.3.1: Develop programs using appropriate language
  • āœ“ MSFT 98-381 C2: Console input/output operations

šŸ”„ AVID/WICOR Integration

  • W Writing: Students write Python code using print statements
  • I Inquiry: Students debug errors and ask syntax questions
  • C Collaboration: Partner programming in Activity #3
  • O Organization: Structured worksheet and exit ticket submission
  • R Reading: Reading passage connects print() to real-life technology

šŸŽ‰ Great job learning about print() in Python!

Remember: Practice makes perfect. Keep coding! šŸ’»

Last updated  2025/10/20 01:04:15 PDTHits  71