Chapter 1: Print Statementยถ

๐Ÿš€ Open Notebookยถ

Open In Colab Open In Kaggle

๐Ÿ“บ Video Tutorialยถ

Watch on YouTube

Start coding with PYTHON in 5 minutes! ๐Ÿ (5:13)

๏ฟฝ๐Ÿ“š What Youโ€™ll Learnยถ

In this chapter, youโ€™ll learn about the print() function, which is your first step in Python programming!

๐ŸŽฏ Learning Objectivesยถ

  • Understand what the print() function does

  • Learn how to display text to the console

  • Write your first Python program

  • Understand the basics of Python comments

๐Ÿ“– Concept Explanationยถ

The print() Functionยถ

The print() function is one of Pythonโ€™s built-in functions that displays output to the console/terminal. Itโ€™s used to:

  • Show messages to users

  • Display results of calculations

  • Debug your code

  • Output any information you want to see

Syntaxยถ

print("Your message here")

Key Pointsยถ

  • Text (strings) must be enclosed in quotes (single ' or double ")

  • Each print() statement creates a new line by default

  • You can print numbers, text, and other data types

๐Ÿ’ก Examplesยถ

Basic Printยถ

print("Hello, World!")

Multiple Linesยถ

print("Line 1")
print("Line 2")
print("Line 3")

โœ๏ธ Practice Exercisesยถ

  1. Print your name to the console

  2. Print your favorite hobby

  3. Create a program that prints a short poem (3-4 lines)

  4. Print your age and favorite color on separate lines

๐Ÿš€ Try It Yourselfยถ

Modify main.py to print information about yourself!

๐Ÿ“ Commentsยถ

Comments are lines that Python ignores. They help explain your code:

# This is a comment
print("This is code")  # This is also a comment

๐ŸŽ“ Key Takeaways from Videoยถ

  1. Download Python interpreter from python.org

  2. Install an IDE (PyCharm or VS Code) for writing Python code

  3. Add Python to PATH during installation (Windows)

  4. Create a new Python project and file

  5. Lists store multiple items in a single variable

๐Ÿ’ก These points cover the main concepts from the video tutorial to help reinforce your learning.

๐Ÿ”— Next Chapterยถ

Continue to Chapter 2: Variables to learn about storing data!