TGViewer
Artificial Intelligence Artificial Intelligence @machinelearning_deeplearning · 56.3K subscribers
Post #1852 5.24K
In the previous post, we learned what Python is and why it is the most popular programming language for AI. Before writing our first program, we need to set up our development environment.

📖 Phase 1: Programming Fundamentals

📌 Topic 3: Installing Python & VS Code

To start coding in Python, you need two things:

• Python – The programming language that will run your code.

• Visual Studio Code (VS Code) – A lightweight and powerful code editor where you'll write and manage your programs.

Step 1: Install Python

1. Visit the official Python website.

2. Download the latest stable version for your operating system.

3. Run the installer.

4. Make sure to check "Add Python to PATH" before clicking Install Now.

5. Complete the installation.

Step 2: Verify the Installation

Open Command Prompt (Windows) or Terminal (macOS/Linux) and type:

python --version

or

python3 --version

If Python is installed successfully, you'll see something like:

Python 3.x

Step 3: Install VS Code

1. Download and install Visual Studio Code.

2. Open VS Code after installation.

3. Go to the Extensions tab.

4. Search for Python.

5. Install the official Python extension by Microsoft.

Step 4: Create Your First Python File

• Open VS Code.

• Create a new folder for your project.

• Create a new file named: hello.py

Step 5: Write Your First Python Program

print("Hello, World!")

Step 6: Run the Program

Click the Run button in VS Code or open the terminal and run:

python hello.py

Output:

Hello, World!

Why Use VS Code?

VS Code is one of the most popular code editors because it offers:

✅ Intelligent code suggestions (IntelliSense)

✅ Built-in debugging

✅ Integrated terminal

✅ Git & GitHub support

✅ Extensions for almost every programming language

✅ Lightweight and fast

Common Beginner Mistakes

❌ Forgetting to check "Add Python to PATH" during installation.

❌ Installing Python but not verifying it using the terminal.

❌ Saving the file without the ".py" extension.

❌ Running the wrong Python version when multiple versions are installed.

Key Takeaways

• Install Python before writing any code.

• VS Code is an excellent editor for Python development.

• Always verify your Python installation.

• Your first Python program is traditionally "Hello, World!"

• A proper setup makes learning Python much easier.

➡️ Double Tap ❤️ For More
  • ❤ 37
More from @machinelearning_deeplearning
  1. Sep 22, 2026🚀 Welcome back to our AI Engineer Roadmap! ❤️ In the previous posts, we learned about fun…
  2. Sep 21, 2026🚀 Welcome back to our AI Engineer Roadmap! ❤️ In the previous post, we explored functions…
  3. Sep 20, 2026In the previous post, we learned how conditional statements allow Python programs to make…
  4. Sep 19, 2026In the previous post, we explored Python operators and even tested ourselves with some tri…
  5. Sep 18, 2026In the previous post, we learned how to convert one data type into another using Type Cast…
  6. Sep 17, 2026In the previous post, we learned how to take input from users and display output. One impo…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →