What is Python & Your First Program

beginner level · ~10 min · Module 1: Getting Started with Python

Learn about Python as an interpreted language and run your first print statement.

Learning objectives

  • Understand what makes Python an interpreted, high-level language
  • Learn how code execution works in Python
  • Use the print() function to output text to stdout

Lesson material

Introduction to Python

Python is a high-level, interpreted, general-purpose programming language created by Guido van Rossum in 1991.

Key Characteristics:

  • Interpreted: Python code is executed line by line at runtime without compile steps.
  • Dynamically Typed: Variable types are evaluated automatically.
  • Readable: Clean, human-friendly syntax with significant indentation.
  • Batteries Included: Vast standard library for web, scripting, data science, and automation.

The print() Function

The primary function for writing output to the screen in Python is print(). You pass values inside parentheses, enclosed in single or double quotes for text (strings).

Example code

# Printing a simple greeting
print("Hello, Python Learner!")

# Printing multiple items separated by space
print("Python", "is", "awesome!")

# Printing numbers and math results
print("2 + 2 =", 2 + 2)

Common beginner mistakes

Capitalized Print Function

Incorrect:

Print("Hello World")

Correct:

print("Hello World")

Python is strictly case-sensitive. "Print" with a capital P is a NameError.

Missing Quotes around Strings

Incorrect:

print(Hello)

Correct:

print("Hello")

Without quotes, Python looks for a variable named Hello.

Practice exercise: Write Your First Print Statement

Use the print() function to output the exact string "Hello, Python!"

Coding challenge: Multi-line Greetings

Print two lines of text: line 1 should say "Welcome to Python" and line 2 should say "Line 2 Ready"

Test yourself with the Module 1: Getting Started with Python quiz →

View the full Python curriculum →