AIMY: Python is the language AI runs on. Not because it's the only language — because it's the one every AI library, every model training pipeline, and every API client is written in. Learning Python is not optional if you want to work with AI seriously. The good news: you only need to learn a small fraction of Python to do 90% of AI work. This module covers that fraction.
ANALYZE
What Python Actually Is and Does
1
Python is a script
A Python file is a text file ending in .py that your computer reads line by line and executes. That's it. No compilation. No special environment. Type instructions, run instructions, see results.
2
Variables store values
x = 5 means "store the value 5 in a container called x." message = "Hello" stores text. That's all a variable is — a named container.3
Functions do work
def greet(name): defines a function that takes a name and does something with it. Functions let you write code once and use it many times.4
Print shows output
print("anything") displays text in the terminal. Every program you write in this course will use print to show you what's happening.INTEGRATE
Write and Run Your First Script
- Open VS Code with your aiiqm-workspace folder.
- In the file explorer, right-click → New File → name it
hello_aiiqm.py - Type exactly:
print("AIIQM Workspace: Active")— press Enter —print("Module F4: Speaking Python")— press Enter —name = "Architect in Training"— press Enter —print("Student:", name) - Save the file (Ctrl+S / Cmd+S).
- Open the integrated terminal. Type:
python hello_aiiqm.pyand press Enter. - You should see three lines of output. If you see a "python not found" error, try
python3 hello_aiiqm.py. - Now add one more line:
print("Status: Foundation Level Complete")— save — run again.
PTR (PROOF THAT IT RUNS)
- You see all four print outputs in the terminal.
- You can edit the name variable to your actual name and the output updates.
- Running
python hello_aiiqm.pyworks without errors.
Common Mistakes
IndentationError
Python uses spaces to define structure. If you get an indentation error, check that your lines inside a function are indented consistently (4 spaces is standard).
"python: command not found"
Try
python3 instead of python. If neither works, Python needs to be installed — go to python.org and download Python 3.11 or later.CHECKPOINT
- You created and ran a .py file.
- You used print, variables, and saw output.
- You know the difference between writing code and running it.
- You can modify the script and run it again.
AIM COMMITMENT
Analyze: You understood Python as a script language — text instructions your computer executes line by line.
Integrate: You wrote a real Python script with variables and print statements and ran it in the terminal.
Manage: You can now create, edit, and run Python files — the foundation of every AI tool in this course.