Python Series track

Week 01 · Basic Track

Week 1 — Getting Started with Python

Learn what Python is, install Python 3.10+ and VS Code, run your first print statement, and understand the difference between REPL and script mode.

Basic Track3 min readFree lesson

Level: Beginner | Prerequisites: None

Learning Goals

  • Can explain the difference between a programming language and an interpreter
  • Install the Python development environment (Python + VS Code) by yourself
  • Write and run your first Python program
  • Understand the difference between REPL and scripts
  • Add explanations to code using comments

1. What is Python

Python is an interpreted language released in 1991 by Guido van Rossum. It is designed with readable syntax, making it one of the best languages for beginners to learn first.

Areas of use:

  • Web development (Django, FastAPI)
  • Data analysis and machine learning (Pandas, PyTorch)
  • Automation and scripting
  • Games, embedded systems, education, etc.

Compiled vs Interpreted: Python executes code line by line immediately. Therefore, it is strong for rapid prototyping, but the execution speed is slower compared to languages that are compiled in advance.

2. Setting Up the Development Environment

Installing Python

  • Official site: https://www.python.org/downloads/
  • Version: 3.10 or higher recommended
  • Windows: Be sure to check "Add Python to PATH" when installing
  • macOS: brew install python is also possible

Verifying the Installation

In the terminal (or command prompt):

python --version       # Python 3.x.x
python3 --version      #macOS/Linux usually python3

Installing VS Code

3. First Program — Hello, World!

REPL (Interactive Mode)

Type pythonZX in the terminal → >>> prompt appears → Enter one line at a time and see the result immediately.

>>> print("Hello, Python!")
Hello, Python!
>>> exit()

Script Mode

Save code in a file and run it. This is the basis of actual development.

#After creating a file called hello.py
python hello.py

→ See examples/01_hello.py.

4. Comments

Start with # to comment to the end of the line. The computer ignores it; only humans read it.

#// Single line comment
print("Executed")    #// Can also be at the end of the line

Multi-line comments can also be represented with """...""", but strictly speaking, these are strings.

Key Examples (examples/)

File Content
01_hello.py First output using print()
02_multiple_print.py Multi-line output
03_comments.py How to use comments

⚠️ Common Mistakes

  1. python command does not work in the terminal → PATH not registered in Windows. Run the installer again and check "Add Python to PATH".

  2. "SyntaxError: Missing parentheses in call to 'print'" → Using Python 2 syntax (print "hello"). Python 3 requires parentheses (print("hello")).

  3. Korean characters are garbled → When saving a file, if the encoding is not UTF-8. Check the encoding display at the bottom right of VS Code.

  4. Forgot to include quotation marks like print(Hello) → NameError: name 'Hello' is not defined. Strings must always be enclosed with "..." or '...'.

❓ Frequently Asked Questions (FAQ)

Q1. What is the difference between python and python3? A. Often, you need to specify python3 because system Python 2 comes installed with In-macOS/Linux. On Windows, usually python alone works. Try both.

Q2. Can I use editors other than VS Code? A. Yes. PyCharm, Sublime Text, and Notepad are also possible. However, environments without autocomplete or debugging decrease learning efficiency.

Q3. Should I use REPL or scripts? A. Short experiments or checks use REPL, actual programs use scripts. Both are frequently used in class.

Q4. Is there any other way to output besides print? A. There are lower-level functions like sys.stdout.write(), but for beginners, print() alone is sufficient.

📝 Exercises (exercises/)

  • exercise1.md — Environment setup verification
  • exercise2.md — Print self-introduction using intro.py
  • exercise3.md — Self-introduction card (at least 5 print)

Answers (solutions/)

First, try to solve it yourself and refer to solutions/ only when stuck.

Next Week

Week 2. Variables and Data Types — How to handle data by storing it in variables

Example files

The runnable files used in this lesson. Copy them into your own project and experiment.

examples/01_hello.pyPython
print("Hello, Python!")
examples/02_multiple_print.pyPython
print("Name: Hong Gil-dong")
print("Age: 20")
print("Hobby: Coding")
examples/03_comments.pyPython
#This is a single-line comment — the computer ignores this line
print("Hello, Python!")    #Comments can also be at the end of a line

"""Triple quotes are strictly string literals, but if they are not used anywhere, they effectively function like multi-line comments."""

print("Comments are very useful for explaining code.")
starters/intro_starter.pyPython
#Assignment 2. intro.py starter code
#Fill in your personal information in the blanks below and print it

print("Name: ___")
print("Age: ___")
print("City: ___")
print("Language: ___")

Assignment

Goal

Confirm that Python and VS Code are installed correctly.

Requirements

  1. Check the Python version in the terminal with the following command:
    python --version
    
  2. Launch VS Code and install the Python extension (Microsoft)
  3. Submit the following two screenshots:
  • python --version result in the terminal
  • Screen showing print("Hello") written and executed in VS Code

Grading

  • Python 3.10 or higher installed — 50%
  • Code successfully executed in VS Code — 50%

Assignment 2. intro.py — Print Self-Introduction

Goal

Write your first program using print() that prints your personal information.

Requirements

  • File name: intro.py
  • Print the following information line by line:
  • Name
  • Age
  • City you live in
  • Favorite programming language (if none, "None yet")

Input/Output Example

$ python intro.py
Name: Hong Gil-dong
Age: 20
City: Seoul
Language: Python

Starter Code

Refer to exercises/intro_starter.py.

Grading

  • All 4 items printed — 70%
  • Format similar to example — 20%
  • Correct file name — 10%

Assignment 3. Self-Introduction Card

Goal

Use 5 or more print() to print a self-introduction card.

Requirements

  • Print in card format (including separators)
  • At least 5 information items

Input/Output Example

$ python card.py
=========================
Self-introduction Card
=========================
Name   : Hong Gil-dong
Age    : 20
School : OO University
Major  : Computer Engineering
Hobby  : Coding, Gaming
=========================

Grading

  • 5 or more items — 60%
  • Card format (separator) — 30%
  • Neat alignment — 10%
Show the reference solution

Try the assignment yourself first — comparing your attempt with a working solution is where most of the learning happens.

solution2.pyPython
print("Name: Hong Gil-dong")
print("Age: 20")
print("City: Seoul")
print("Language: Python")
solution3.pyPython
print("=========================")
print("Self-introduction Card")
print("=========================")
print("Name   : Hong Gil-dong")
print("Age    : 20")
print("School : OO University")
print("Major  : Computer Engineering")
print("Hobby  : Coding, Gaming")
print("=========================")

Learn this lesson with a mentor

Work through the Python Series track on your own, or join a guided cohort at our Pitampura campus and online.

Call NowEnroll Now