Introduction to Python Program-
ming
Welcome to your first Python lesson! In this class, we’ll discover what Python
is, who created it, and how we can write our first programs using the Spyder
environment.
1. What is Python?
Python is a fun and easy-to-learn programming language. It helps us create games
, websites , mobile apps , and even control robots !
Python is:
– Simple and readable: it looks almost like English.
– Versatile: used in web, data science, and AI.
– Beginner-friendly: perfect for new programmers.
2. Who Created Python?
Guido van Rossum, a Dutch programmer, created Python in the late 1980s. He
wanted a language that was powerful, easy, and fun. Python’s name comes from
the comedy group “Monty Python”, not from the snake!
3. What Kind of Language is Python?
Python is a high-level, interpreted, and object-oriented language.
That means:
• You don’t need to worry about computer memory (Python does it for you).
• You can run your code line by line.
1
• You can create classes and objects like in real-world examples.
Example
When we say print("Hello!"), Python reads and runs that line immediately.
4. Interpreter vs Compiler
Understanding How Code Runs
Compiler: Translates the whole program before running it. Interpreter: Runs
code line by line.
Python is an interpreted language. It first converts your code into bytecode and
then runs it using the Python Virtual Machine (PVM).
In short: Python reads and runs your code instantly — that’s why you get quick
results!
5. Python Tools: Python, IDLE, and Spyder
The Python Interpreter
This is the engine that runs your code. You can open it in the terminal by typing:
python
Then type Python commands directly!
—
IDLE (Integrated Development and Learning Environment)
IDLE is a simple environment included with Python. It’s great for beginners to
write and run small programs.
Features:
• Code editor with syntax colors
• “Run” button to execute instantly
2
• Interactive Python shell
Spyder (Scientific Python Development Environment)
Spyder is a modern and powerful IDE included with Anaconda. It looks a bit
like MATLAB and is great for data science, math, and engineering.
Features:
• Smart code editor with auto-completion
• Variable explorer (see your data)
• Plot viewer and debugging tools
• Works perfectly for beginners and scientists alike
6. Quick Comparison
pythonblue!20 Type What It Does
Tool
Python Language The actual programming language and
interpreter
IDLE IDE (built-in) Simple beginner tool to write and run
code easily
Spyder IDE (Anaconda) Professional and student-friendly IDE
for science and data work
—
7. Your First Python Program!
Let’s Try It!
# My first Python program
print("Hello, Python world!")
name = input("What is your name? ")
print("Welcome,", name, "!")
3
Run this in Spyder or IDLE! You’ll see Python responding to you instantly —
that’s the magic of an interpreted language
—
8. Recap
• Python was created by Guido van Rossum in 1991.
• It’s an interpreted, high-level, and beginner-friendly language.
• We’ll use Spyder, which makes coding easy and visual.
• Python runs code line by line using its interpreter.
”Learning Python is like learning magic — the more you practice, the more powerful
you become!”