Assignmnet0
Assignmnet0
Assignment 00
Python
Teaching Assistant
Wooseok Song
© 2025 Data Science & AI Laboratory, Seoul National University. This material is for educational uses only. Some contents are based on the
material provided by other paper/book authors and may be copyrighted by them.
Headline
Python vs C++
Introduction
Simple syntax
Interpreted language
Dynamically typed
Rich third-party libraries
Assignment 00
Problem 1: Function
Problem 2: Class
과제 다운로드 및 제출 안내
Python vs C++
Introduction
Simple syntax
Interpreted language
Dynamically typed
Rich third-party libraries
Assignment 00
Problem 1: Function
Problem 2: Class
과제 다운로드 및 제출 안내
Introduction
Most of recent ML&DL applications are built in Python language.
Why did Python become the industry standard in AI?
etc …
Image source: https://ko.wikipedia.org/wiki/Stable_Diffusion;챗GPT;클로드_(언어_모델);Grok;Suno_AI; 제미니_(챗봇), https://openai.com/sora/
Simple syntax
Python has simple and readable syntax.
It makes debugging and development in Python easy and efficient,
even when the start code was not written by you.
• Python
Fast to Implement & Debug
• C++
Interpreted Language
Python uses Interpreter to make the code executable while C++ uses Compiler.
Interpreter translates and executes code line-by-line at runtime.
Compiler translates entire codes into machine code in one step before execution.
• Python
• C++
Interpreted Language
Compiler has FASTER code execution and BETTER memory efficiency.
But Interpreter has Platform-Independency and FASTER development cycle.
Therefore, Python is more advantageous than C++ in AI open-source environment.
• Python
• C++
Dynamically Typed
Python’s variables are dynamically typed,
that means “variables can change types during execution”.
And also there is no need to declare the data type when defining a variable.
• Python
• C++
Dynamically Typed
It makes Python easier to handle and more favorable for fast development.
But it is also risky design that can occur unexpected crashes or mishandling.
Therefore, it is important to pay attention to variable definitions.
• Python
• C++
Python vs C++
Introduction
Simple syntax
Interpreted language
Dynamically typed
Rich third-party libraries
Assignment 00
Problem 1: Function
Problem 2: Class
과제 다운로드 및 제출 안내
Problem 1: Function
Implement the code of Binary search algorithm in a function.
Problem 2: Class
Implement the code of Sorter class that includes selection, insertion, merge sort
algorithms.
과제 다운로드 및 제출 안내
과제 다운로드
• 포함된 파일: 3개
1. AS0-Python.ipynb
2. CollectSubmission.sh
3. AS0-Python.py
과제 다운로드 및 제출 안내
개인 과제 (팀 과제 X)
• Due: 03/26 (23:59)
Assignment 0 will not be scored (submit << optional)
• 제출 안내
.ipynb 파일 상에서 과제 완료 후, .py 파일에 똑같이 구현 코드 입력
이후 ./CollectSubmission.sh {학번} 실행 (ex. ./CollectSubmission.sh 2025-12345)
{학번}.tar.gz를 eTL에 업로드