🌟 Introduction

You just need curiosity.

By the end of this lesson, you will:

Let’s begin 🐾

first python program

🧠 What Is a Python Program?

A Python program is a set of instructions written for a computer.

Just like a recipe tells you how to make a cake,
a Python program tells the computer what to do.

These instructions are written inside a file called a script.


📄 What Is a Script?

A script is simply a file that contains Python code.

Python script files always end with:

.py

Example:

hello.py

Inside this file, we write instructions line by line.


▶️ Your First Python program: print()

The most famous beginner instruction in Python is:

print()

The print() function tells Python:
👉 “Show something on the screen.”


✨ Write Your First Python Program

Type this code exactly as shown:

print("Hello, Python Cubs!")

Now run the program.

🎉 Output:

Hello, Python Cubs!

Congratulations — you just wrote your first Python program 🥳


🧪 More print() Examples (Try These!)

Example 1: Print Your Name

print("My name is Alex")

Example 2: Print a Fun Message

print("I am learning Python!")

Example 3: Print Numbers

print(5 + 10)

Example 4: Print Emojis

print("🐍🐍🐍")

Kids love this one 😄


🖨️ Print Function in Python: All the Useful Variations (With Examples)

The print() function is one of the first and most important tools you’ll learn in Python.
It helps you show text, numbers, and results on the screen.

Think of print() as Python’s way of talking to you.

Let’s explore all the useful ways you can use it.


1️⃣ Basic Print

The simplest form prints text.

print("Hello, Python!")

Output:

Hello, Python!

📌 Text must be inside quotes.


2️⃣ Printing Numbers

You can print numbers without quotes.

print(10)
print(3.14)

Output:

10
3.14

3️⃣ Printing Math Results

Python can calculate and print the answer instantly.

print(5 + 3)
print(10 - 4)
print(6 * 7)
print(20 / 5)

Output:

8
6
42
4.0

4️⃣ Printing Multiple Items

You can print many things at once using commas.

print("My age is", 10)

Output:

My age is 10

Python automatically adds spaces between items.


5️⃣ Printing Variables

Variables store information.

name = "Alex"
age = 12

print(name)
print(age)

Output:

Alex
12

6️⃣ Mixing Text and Variables

You can mix words and variables easily.

name = "Sam"
print("Hello", name)

Output:

Hello Sam

7️⃣ Using sep (Separator)

By default, Python separates items with a space.
You can change this using sep.

print("Python", "is", "fun", sep="-")

Output:

Python-is-fun

Other examples:

print(1, 2, 3, sep=", ")

Output:

1, 2, 3

8️⃣ Using end (End of Line Control)

Normally, print() moves to a new line after printing.
You can change this behavior using end.

print("Hello", end=" ")
print("World")

Output:

Hello World

9️⃣ Printing on New Lines

You can use \n to move to a new line.

print("Hello\nPython\nCubs")

Output:

Hello
Python
Cubs

🔟 Printing Emojis and Symbols

Python supports emojis too!

print("🐍 Python is awesome!")
print("⭐" * 10)

Output:

⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

Kids love this variation 💙


1️⃣1️⃣ Printing Quotes Inside Text

Use single quotes inside double quotes (or vice versa).

print("Python is called a 'beginner-friendly' language")

1️⃣2️⃣ Printing Empty Lines

print()
print("Hello again!")

This creates a blank line before printing text.


❌ Common Print Mistakes

❌ Missing Quotes

print(Hello)

✅ Correct:

print("Hello")

❌ Forgetting Parentheses

print "Hello"

✅ Correct:

print("Hello")

🎯 Mini Task: Make Your Own Welcome Program

Create a Python program that:

  1. Prints your name
  2. Prints your favorite food
  3. Prints a happy message
  4. Prints at least one emoji

Example:

print("Hello, I am Sam!")
print("I love pizza 🍕")
print("Python is fun!")
print("🚀🚀🚀")

Try changing the words and emojis.
There is no wrong answer here.


❓ Common Beginner Questions

“What if I make a mistake?”

Perfect! Mistakes mean you’re learning.

“Why didn’t my code work?”

Check:


📥 Download Your Practice Worksheet (PDF)

To help you practice offline, we’ve created a beginner-friendly worksheet with:

👉 Download the worksheet PDF


🚀 What’s Next?

Now that you’ve written your first program, next you’ll learn:

You’ve officially started your coding journey.
Python Cubs is proud of you on completing your first python program 🐾💙

Scroll to Top