0% found this document useful (0 votes)
11 views

Assignmnet0

This document outlines Assignment 00 for a Machine Learning Fundamentals course, focusing on Python programming. It compares Python and C++ in terms of syntax, execution methods, typing, and availability of third-party libraries, highlighting Python's advantages for AI applications. The assignment includes implementing a binary search function and a Sorter class with various sorting algorithms, with detailed submission instructions provided.

Uploaded by

알럽매쓰
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Assignmnet0

This document outlines Assignment 00 for a Machine Learning Fundamentals course, focusing on Python programming. It compares Python and C++ in terms of syntax, execution methods, typing, and availability of third-party libraries, highlighting Python's advantages for AI applications. The assignment includes implementing a binary search function and a Sorter class with various sorting algorithms, with detailed submission instructions provided.

Uploaded by

알럽매쓰
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

M2608.

002900 Machine Learning Fundamentals

Assignment 00
Python

Teaching Assistant
Wooseok Song

Electrical and Computer Engineering


Interdisciplinary Program in AI Seoul National University

© 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
과제 다운로드 및 제출 안내

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 1


Headline

Python vs C++
Introduction
Simple syntax
Interpreted language
Dynamically typed
Rich third-party libraries

Assignment 00
Problem 1: Function
Problem 2: Class
과제 다운로드 및 제출 안내

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 2


Python vs C++

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/

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 3


Python vs C++

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++

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 4


Python vs 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++

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 5


Python vs 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++

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 6


Python vs 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++

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 7


Python vs 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++

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 8


Python vs C++

Rich third-party libraries


What do third-party libraries mean?
• Additional packages that is developed by Python developers
• Can install with PyPI (ex. $ pip install numpy)
They save researchers’ time and helps solve complex problems quickly.

Image source: https://numpy.org/, https://github.com/scikit-learn/scikit-learn, https://github.com/pytorch/pytorch

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 9


Headline

Python vs C++
Introduction
Simple syntax
Interpreted language
Dynamically typed
Rich third-party libraries

Assignment 00
Problem 1: Function
Problem 2: Class
과제 다운로드 및 제출 안내

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 10


Assignment 00

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.

DO NOT TOUCH anywhere else except “YOUR CODES COMES HERE”.

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 11


Assignment 00

과제 다운로드 및 제출 안내
과제 다운로드
• 포함된 파일: 3개
1. AS0-Python.ipynb
2. CollectSubmission.sh
3. AS0-Python.py

• 다운로드 후 설치 및 실행 방법 (windows의 경우 git bash에서 입력)


tar –xf Assignment0.tar.gz
cd Assignment0
sudo chmod 755 CollectSubmission.sh
jupyter notebook

• IPython notebook 혹은 Colab 환경에서 과제 수행


You can freely use LLMs(ex. ChatGPT, etc.)!

Git bash 설치 : https://velog.io/@selenium/Git-Git-Bash-%EC%84%A4%EC%B9%98-Windows-OS


Anaconda 설치 : https://www.anaconda.com/download/success

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 12


Assignment 00

과제 다운로드 및 제출 안내
개인 과제 (팀 과제 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에 업로드

• Q&A: eTL 게시판 활용


TA E-mail: [email protected]

• Google first before ask on eTL or E-mail

[ M2608.002900 ] Machine Learning Fundamentals Assignment 00: Python 13

You might also like