Lernziele dieses Kapitels
- You understand why Python is THE programming language for beginners
- You can install Python and VS Code on your computer
- You write your first Python program and run it
- You set up your PyBuddy project folder
Why Python?
Welcome to the world of Python! Imagine being able to tell a computer what to do in almost normal language — without complicated brackets or semicolons. That's exactly what Python is.
While HTML and CSS describe (what a website looks like), and JavaScript reacts (to clicks and inputs), Python can do everything: build websites, analyze data, train AI, program games, control robots.
Instagram, YouTube, Spotify, Netflix — they all use Python behind the scenes. And you're standing at the beginning of this journey right now.
Install Python
Python is completely free. We use Python 3.11 or newer — everything else is history.
Go to
python.organd click DownloadsDownload Python 3.x (not Python 2!)
IMPORTANT (Windows): Enable
Add Python to PATHduring installationClick Install Now and wait
Warning
If you forget to "Add Python to PATH", Python won't work in the terminal. Make sure to check this box!
VS Code — Your New Tool
VS Code is like a Swiss Army knife for programmers. You might already know it from the JavaScript Quest. For Python, we only need two extensions:
Open VS Code and press Ctrl+Shift+X
Search for "Python" by Microsoft → Install
Optional: "Pylance" for better auto-completion
Pro Tip
The Python extension shows you errors directly in the editor and suggests code completions — you'll learn much faster!
Your First Program: Hello World
Every programming language starts with Hello World — the simplest program ever. In Python, it's ... surprisingly simple.
Compare for yourself:
# Python (1 line!)
print("Hello World!")
# JavaScript for comparison (3 lines)
# console.log("Hello World!");
# Java for comparison (5 lines!)
# public class Main {
# public static void main(String[] args) {
# System.out.println("Hello World!");
# }
# }
Du kennst bereits JavaScript aus dem JS-Quest. Hier ist der direkte Vergleich:
print("Hello World!")
console.log("Hello World!");
print() and you're good to go!PyBuddy — Your Ongoing Project
Throughout this tutorial, you'll build PyBuddy step by step — your own digital assistant. In the end, PyBuddy will be able to:
- Greet you by name
- Perform calculations
- Save notes
- Fetch current weather
- Communicate with AI
For today, we'll just set up the folder. Create a folder called pybuddy on your computer, and inside it a file called main.py.
# File: pybuddy/main.py
# This is the starting file of your project
print(" Loading PyBuddy...")
print("Ready for your commands!")
Warm-Up: Your Personal Greeting
Write a program that outputs three lines: Your name, your age, and your favorite hobby. Save it as greeting.py.
Hinweis: print("My name is Max")
print("I am 16 years old")
print("My hobby is gaming")
print("My name is Max")
print("I am 16 years old")
print("My hobby is gaming")
Challenge: ASCII Art
Use multiple print() commands to create a small ASCII image — e.g., a cat, a heart, or your favorite gaming character.
Hinweis: print(" /\_/\ ")
print(" ( o.o ) ")
print(" > ^ < ")
print(" /\_/\ ")
print(" ( o.o ) ")
print(" > ^ < ")
PyBuddy Checkpoint: Project Setup
Create the PyBuddy project folder with a main.py that outputs a greeting and your name. This is the start of our big project!
Hinweis: # pybuddy/main.py
print(" Welcome to PyBuddy!")
print("Created by: [Your Name]")
# pybuddy/main.py
print(" Welcome to PyBuddy!")
print("Created by: [Your Name]")
Did you know? Minecraft was originally written in Java — but the modding community loves Python because you can build your own plugins in just a few lines. Soon YOU'll be able to do that too!
Zusammenfassung
- Python is simple, versatile, and the perfect first programming language
- Installation: python.org → Python 3.x → don't forget 'Add to PATH'
- VS Code + Python Extension = your development environment
- <code>print()</code> outputs text — no semicolon, no brackets needed
- PyBuddy is your ongoing project for this tutorial