Python Setup, Syntax, and First Script
Welcome to Python & AI Bootcamp. In this lesson, we will install Python, configure Visual Studio Code, and write our very first script.
Installing Python
Ensure you download Python 3.10 or higher.
- Go to python.org.
- Download the installer for your OS (Windows/Mac/Linux).
- IMPORTANT: On Windows, ensure you check the box that says "Add Python to PATH" before clicking install!
Writing Your First Script
Create a new file named app.py in VS Code and type the following code:
python lang-python
1
2
3
4
5
6
7
8
9
10
11
# First Scriptname = "CourseDock"version = 1.0 print(f"Welcome to {name} version {version}") # Basic control flowif version >= 1.0: print("Ready to integrate AI agents!")else: print("Under development.")Run the script by typing python app.py in your terminal. You should see:
Welcome to CourseDock version 1.0
Ready to integrate AI agents!