STEWAARD ROBSON [STEAZ14]
← Back to Home
Python Logo

Python Lessons for Beginners

Lesson 1: What is Python?

Python is a simple, powerful programming language. It’s great for beginners because its syntax reads like English. You can use it for web development, data science, automation, artificial intelligence, and more. It is one of the most popular languages in the world today.

Lesson 2: Your First Program

The most basic program prints text to the screen. In Python, it looks like this:

print("Hello, World!")

When you run this code, it will show exactly: Hello, World!

Lesson 3: Variables

Variables store data you want to use later. You don’t need to specify the type — Python figures it out automatically:

name = "Stewaard"
age = 20
print(name)
print(age)

Lesson 4: Data Types

Common types of data in Python include:

Strings: Text, e.g. "Hello World"
Integers: Whole numbers, e.g. 5, 100, -30
Floats (Decimals): Numbers with points, e.g. 3.14, 99.9
Booleans: True or False values

Lesson 5: If Statements

Make decisions in your code. Do one thing if true, another if false:

score = 80
if score > 50:
    print("You passed!")
else:
    print("Try again.")