Module 1: Python BasicsLesson 1 of 2

Python Setup, Syntax, and First Script

Duration: 18:12
Watch Lesson VideoPython Setup, Syntax, and First Script

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.

  1. Go to python.org.
  2. Download the installer for your OS (Windows/Mac/Linux).
  3. 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 Script
name = "CourseDock"
version = 1.0
print(f"Welcome to {name} version {version}")
# Basic control flow
if 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!