Introduction to Computer Programming 2017-02: Difference between revisions

From Innovation
Jump to: navigation, search
 
(27 intermediate revisions by the same user not shown)
Line 84: Line 84:


== Schedule and Readings ==
== Schedule and Readings ==
 
=== Part I - Python ===
{|class="wikitable"
{|class="wikitable"
! Week !! Topic !! Lecture !! !! Lab !! !! References
! Week !! Topic !! Lecture !! !! Lab !! !! References
Line 97: Line 97:
| 4 || || Sep-19 || '''[[Intro. to Prog. Lange. Review Week 3| Review Week 3]]'''  <br><br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-07.pdf Repetition D10 Loops] <br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-07a-Flowdiagram.pdf Flow Diagram on loops] <br>'''Reading''':  <br>Day10 while 명령으로 반복하기 || Sept-20 &<br> Sept-22 || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-08.pdf Arrays D14-15 Typing Game] <br>'''Reading''': <br>Day15: 타자 게임 만들기 || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch07.pdf TP2-Ch07: 반복]
| 4 || || Sep-19 || '''[[Intro. to Prog. Lange. Review Week 3| Review Week 3]]'''  <br><br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-07.pdf Repetition D10 Loops] <br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-07a-Flowdiagram.pdf Flow Diagram on loops] <br>'''Reading''':  <br>Day10 while 명령으로 반복하기 || Sept-20 &<br> Sept-22 || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-08.pdf Arrays D14-15 Typing Game] <br>'''Reading''': <br>Day15: 타자 게임 만들기 || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch07.pdf TP2-Ch07: 반복]
|-
|-
| 5 || || Sep-26 || '''[[Intro. to Prog. Lange. Review Week 4| Review Week 4]]''' <br><br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-09.pdf Function D11-12 Definition and calls]<br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-09a-Flowdiagram.pdf Flow Diagram on Functions] <br>'''Reading''':  <br>Day11 함수를 정의하고 호출하기 <br>Day12 함수 응용하기 || Sept-27 &<br> Sept-29 || Review || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch03.pdf TP2-Ch03: 함수] [http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch07.pdf TP2-Ch06: 결과가 있는 함수]
| 5 || || Sep-26 || '''[[Intro. to Prog. Lange. Review Week 4| Review Week 4]]''' <br><br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-09.pdf Function D11-12 Definition and calls]<br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-09a-Flowdiagram.pdf Flow Diagram on Functions] <br>'''Reading''':  <br>Day11 함수를 정의하고 호출하기 <br>Day12 함수 응용하기 || Sept-27 &<br> Sept-29 || Review || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch03.pdf TP2-Ch03: 함수] [http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch06.pdf TP2-Ch06: 결과가 있는 함수]
|-
|-
| 6 || C || Oct-03 || 추석 || Oct-4-6 || 추석 ||  
| 6 || C || Oct-03 || 추석 || Oct-4-6 || 추석 ||  
|}
=== Part II - C Fundamentals ===
{|class="wikitable"
! Week !! Topic !! Lecture !! !! Lab !! !! References
|-
|-
| 7 || || Oct-10 || EXAM I Place: 407-101 Duration: 2 Hours || Oct-11 &<br> Oct-13 || Exam Review & [https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-s096-introduction-to-c-and-c-january-iap-2013/lectures-and-assignments/compilation-pipeline/MIT6_S096_IAP13_lec1.pdf Compilation Pipeline] <br>[[IPL2017-02 Compilation Pipeline Lab |  Lab]] ||
| 7 || || Oct-10 || EXAM I Place: 407-101 Duration: 2 Hours || Oct-11 &<br> Oct-13 || Exam Review & [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_00_compilation_pipeline_LAB.pdf Compilation Pipeline] <br>[[IPL2017-02 Compilation Pipeline Lab |  Lab]] || <!-- [https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-s096-introduction-to-c-and-c-january-iap-2013/lectures-and-assignments/compilation-pipeline/MIT6_S096_IAP13_lec1.pdf Compilation Pipeline]--> To use <code>gcc</code> in Windows, read this [http://goproprada.tistory.com/387 page] <br><br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/code/ipl_c_00_lab.tar.gz SRC files] <br> To extract the files type <code>tar -xjvf FILENAME</code> in the terminal
|-
|-
| 8 || || Oct-17 || C fundamentals, Formatted Input/Output<BR>'''READING:''' KNK 2, 3 or K&R 1 || Oct-18 &<br> Oct-20 || Ex08 <!-- [[Exercises on C Fundamentals]]--> ||
| 8 || || Oct-17 || C fundamentals, Formatted Input/Output<br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_01_introduction_formatted_IN-OUT.pdf KNK_C_01_introduction_formatted_IN-OUT.pdf ]  <BR>'''READING:''' KNK 2, 3 or K&R 1 || Oct-18 &<br> Oct-20 || Ex08 <br>[[Exercises on C Fundamentals]] <br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_01_introduction_formatted_IN-OUT_LAB.pdf KNK_C_01_introduction_formatted_IN-OUT_LAB.pdf] || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/code/ipl_c_01_lab.tar.gz SRC files]
|-
|-
| 9 || || Oct-24 || '''[[Intro. to Prog. Lange. Review Week 8| Review Week 8]]''' <br><br> Expression, Basic Types<BR>'''READING:''' KNK 4, 7 or K&R 2 || Oct-25 &<br> Oct-27 || Exercise 9 ||
| 9 || || Oct-24 || <!--'''[[Intro. to Prog. Lange. Review Week 8| Review Week 8]]''' <br><br>--> Expression, Selection Statement<br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_02_Expression_selection.pdf KNK_C_02_Expression_selection.pdf]<BR>'''READING:''' KNK 4, 5 or K&R 2 || Oct-25 &<br> Oct-27 || Exercise 9<br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_02_Expression_selection_LAB.pdf KNK_C_02_Expression_selection_LAB.pdf] || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/code/ipl_c_02_lab.tar.gz SRC files]
|-
|-
| 10 || || Oct-31 || '''[[Intro. to Prog. Lange. Review Week 9 | Review Week 9]]''' <br><br> Control Flow<BR>'''READING:''' KNK 5, 6 or K&R 3 || Nov-01 &<br> Nov-03 || Exercise 10 ||
| 10 || || Oct-31 || <!--'''[[Intro. to Prog. Lange. Review Week 9 | Review Week 9]]''' <br><br> -->Control Flow<BR>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_03_control_flow.pdf KNK_C_03_control_flow.pdf]<br>'''READING:''' KNK 6 or K&R 3 || Nov-01 &<br> Nov-03 || Exercise 10<br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_03_control_flow_LAB.pdf KNK_C_03_control_flow_LAB.pdf] || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/code/ipl_c_03_lab.tar.gz SRC files]
|}
 
=== Part III - C Arrays and Pointers ===
{|class="wikitable"
! Week !! Topic !! Lecture !! !! Lab !! !! References
|-
|-
| 11 || || Nov-07 || EXAM II Place: 407-101 Duration: 2 Hours || Nov-08 &<br> Nov-10 || Exam Review ||
| 11 || || Nov-07 || EXAM II Place: 407-101 Duration: 2 Hours || Nov-08 &<br> Nov-10 || Exam Review <br><br> '''포인터 학습법 제출일'''||
|-
|-
| 12 || || Nov-14 || '''[[Intro. to Prog. Lange. Review Week 11 | Review Week 11]]''' <br><br> Arrays, Functions<BR>'''READING:''' KNK 8,9 or K&R 1.6, 4 || Nov-15 &<br> Nov-17 || Exercise 11 ||
| 12 || || Nov-14 || '''[[Intro. to Prog. Lange. Review Week 11 | Review Week 11]]''' <br><br> Arrays, Functions<BR>'''READING:''' KNK 8,9 or K&R 1.6, 4 <br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_04_array_functions.pdf KNK_C_04_array_functions.pdf] || Nov-15 &<br> Nov-17 || Exercise 11 <br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_04_array_functions_LAB.pdf KNK_C_04_array_functions_LAB.pdf] || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/code/ipl_c_04_lab.tar.gz SRC files]
|-
|-
| 13 || || Nov-21 || '''[[Intro. to Prog. Lange. Review Week 12 | Review Week 12]]''' <br><br> Pointers<BR>'''READING:''' KNK 11 or K&R 5 || Nov-22 &<br> Nov-24 || Exercise 12 ||
| 13 || || Nov-21 || '''[[Intro. to Prog. Lange. Review Week 12 | Review Week 12]]''' <br><br> Pointers<BR>'''READING:''' KNK 11 or K&R 5 <br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_05_Pointers.pdf KNK_C_05_Pointers.pdf] || Nov-22 &<br> Nov-24 || Exercise 12 <br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_05_Pointers_Arrays_LAB.pdf KNK_C_05_Pointers_Arrays_LAB.pdf] || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/code/ipl_c_05_lab.tar.gz SRC files]
|-
|-
| 14 || || Nov-28 || '''[[Intro. to Prog. Lange. Review Week 13 | Review Week 13]]''' <br><br> Pointers and Arrays<BR>'''READING:''' KNK 12 || Nov-29 &<br> Dec-01 || Exercise 13 ||
| 14 || || Nov-28 || '''[[Intro. to Prog. Lange. Review Week 13 | Review Week 13]]''' <br><br> Pointers and Arrays<BR>'''READING:''' KNK 12<br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_06_point_arr_struct_sum.pdf 요약자료] <br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_06_Pointers_Arrays.pdf 포인터와 배열] <br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_06_Structures.pdf 구조체] || Nov-29 &<br> Dec-01 || Exercise 13 ||
|-
|-
| 15 || || Dec-05 || '''[[Intro. to Prog. Lange. Review Week 14 | Review Week 14]]''' <br><br> Structures<BR>'''READING:''' KNK 16 or K&R 6 || Dec-6-8 || Exercise 14 ||
| 15 || || Dec-05 || '''[[Intro. to Prog. Lange. Review Week 14 | Review Week 14]]''' <br><br> Structures<BR>'''READING:''' KNK 16 or K&R 6 <br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/KNK_C_07_Review_LABs.pdf Review] || Dec-6-8 || Exercise 14 ||
|-
|-
| 16 || || Dec-12 || Exam III Place: 407-101 Duration: 2 Hours || || ||
| 16 || || Dec-12 || Exam III Place: 407-101 Duration: 2 Hours || || ||

Latest revision as of 10:34, 25 June 2018

Class Information

Class Info
Class ETA00086 - 프로그래밍 기초, ETA00087 프로그래밍 기초 실습
Lecturer Seongjin Lee
Assistant Dongsoo Lee (s32719 at naver dot com)
Juhyeok Park (wngur3110 at naver dot com)
Office: 407-310
Time and Place Tuesday: 407-101 09:00-11:00
Wednesday: 407-202 10:00-12:00
Friday: 407-202 10:00-12:00
Office Hour Tuesday: 11:00-12:00
Contacts Office: 407-314
Email: insight at gnu dot ac dot kr

Course Introduction

In the Computer Engineering, the language you use determines the capabilities of the software you develop. The more powerful a language is, the easier you can increase the performance and the simpler you can write the software. We are going to learn two languages in this course, Python and C. Python is a versatile, yet powerful, language that is easy to learn as well as the ease of the use. Many of the well-known companies are using Python to solve many of the engineering problems. For example, Dropbox desktop client is written in Python. Another language we are learning in the class is C. Since Dennis Ritchie at AT&T Bell Lab in the early 1970s developed C Programming Language, it has become one of the most powerful language used by various developers working in mobile, enterprise, and embedded systems. The success of C language is the result from its portability, standard library, ready use of the hardware, and ease of optimization.

For your information, Prof. Seonah Lee is teaching the same course, and recommend all the students to visit her site [1] as well. Do interact with all the classmates and share. Don't be a big fish in a pond.

Goal

In this course, we are going to learn the essence of two languages, namely Python and C. Students are going to learn the following concepts.

  • Compiling and running the program
  • Variables, Data Types, and Arithmetic Expressions
  • Loops and Control Flows
  • Arrays and Pointers
  • Functions
  • Data Structures
  • File I/O

Textbook

Python

There are two textbooks for Python. The class is based on the first book which is elementary and an introductory textbook on python for absolute beginner, but the second book is recommend. Although there is no Korean version of Think Python, it is written in plain English with friendly style. It would be better to have this book rather than the first. Moreover, the author made it freely available on the web.

  1. 모두의 파이썬 20일 만에 배우는 프로그래밍 기초 | 이승찬 지음 | 길벗 | 2016년 05월 09일 출간 교보문고 바로가기
  2. Allen B. Downey, "Think Python: How to Think Like a Computer Scientist", 2015, 정식 번역본 없음 바로가기

C

There are two must have and one recommended--solely because there is translated book available. The first two books are must have textbooks. The third one is recommended. I also recommend you to read C언어 공부법과 책추천(by sunyzero). It gives guide on how to study the language and also emphasizes why the first two books are required textbooks. I recommend to buy the original books and not the translated books.

  1. K.N. King, "C Programming: A Modern Approach," W. W. Norton & Company, 2nd Edition, 2008 교보문고 바로가기 (KNK로 표기)
  2. Brian W. Kernighan, Dennis M. Ritchie, "C Programming Language" Prentice Hall, 1988 (2nd Edition) (Kernighan 의 C언어 프로그래밍) 교보문고 바로가기 (K&R로 표기)
  3. Stephen Prata. "C Primer Plus". Sams, 2004 (C 기초 플러스) 교보문고 바로가기


For your information, we used the following book on 2016.

  • 어서와 C언어는 처음이지! 초보자를 위한 C 프로그래밍 완벽가이드 | 그레그 페리 , 딘 밀러 지음 | 천인국 옮김 | 인피니티북스 | 2015년 06월 26일 출간

Evaluation

Categories Ratio Categories Ratio
Attendance 10 Exam I 25
Assignments 20 Exam II 20
Exam III 25
Total 100%

Homework and Guidelines

  • Every week, you are to write detailed report on three concepts, one page for each concept. Download the template (User right click to download) Due date is every Tuesday
  • Every assignment must be handed in within a week, unless otherwise notified.
  • NEVER screen capture the code and paste in the document. Font size should never be under 10pt. Try to make it concise and up to point. Please use portrait orientation.One page reports are most welcomed.
  • Put your Number (ex, 32B or 61A), name, submission date on the top left corner. Please write the information on the header.

Schedule and Readings

Part I - Python

Week Topic Lecture Lab References
1 Python Aug-29 Course Overview & Flow Diagram
Reading:
Day01
Aug-30 &
Aug-01
Variables D02-03, Operations and variables
Reading:
Day02 간단한 프로그램 만들기
Day03 연산과 변수

HW
HW No1
TP2-Ch01: 프로그래밍의 정도

TP2-Ch02: 변수와 수식 그리고 문장

2 Sep-05 Review Week 1

Flow Diagram on loops
D04-05 for Loops
Reading:
Day04 for 명령을 사용하여 똑같은 작업 반복하기
Day05 range 명령을 사용하여 변화를 주면서 반복하기
Sept-06 &
Sept-08
D06-07 Drawing and Input
Reading:
Day06 거북이 그래픽으로 그림 그리기
Day07 정보 입력하기

HW
TP2-Ch05: 조건문과 재귀문
3 Sep-12 Review Week 2

D08-09 Condition, Random
Flow Diagram on conditions
Reading:
Day08 True/False 판단하기
Day09 random 모듈로 임의의 수 뽑기
Sept-13 &
Sept-15
D13-14 거북이 응용과 계산 게임
Reading:
Day13 거북이 그래픽 응용하기
Day14 계산 맞히기 게임 만들기
4 Sep-19 Review Week 3

Repetition D10 Loops
Flow Diagram on loops
Reading:
Day10 while 명령으로 반복하기
Sept-20 &
Sept-22
Arrays D14-15 Typing Game
Reading:
Day15: 타자 게임 만들기
TP2-Ch07: 반복
5 Sep-26 Review Week 4

Function D11-12 Definition and calls
Flow Diagram on Functions
Reading:
Day11 함수를 정의하고 호출하기
Day12 함수 응용하기
Sept-27 &
Sept-29
Review TP2-Ch03: 함수 TP2-Ch06: 결과가 있는 함수
6 C Oct-03 추석 Oct-4-6 추석

Part II - C Fundamentals

Week Topic Lecture Lab References
7 Oct-10 EXAM I Place: 407-101 Duration: 2 Hours Oct-11 &
Oct-13
Exam Review & Compilation Pipeline
Lab
To use gcc in Windows, read this page

SRC files
To extract the files type tar -xjvf FILENAME in the terminal
8 Oct-17 C fundamentals, Formatted Input/Output
KNK_C_01_introduction_formatted_IN-OUT.pdf
READING: KNK 2, 3 or K&R 1
Oct-18 &
Oct-20
Ex08
Exercises on C Fundamentals
KNK_C_01_introduction_formatted_IN-OUT_LAB.pdf
SRC files
9 Oct-24 Expression, Selection Statement
KNK_C_02_Expression_selection.pdf
READING: KNK 4, 5 or K&R 2
Oct-25 &
Oct-27
Exercise 9
KNK_C_02_Expression_selection_LAB.pdf
SRC files
10 Oct-31 Control Flow
KNK_C_03_control_flow.pdf
READING: KNK 6 or K&R 3
Nov-01 &
Nov-03
Exercise 10
KNK_C_03_control_flow_LAB.pdf
SRC files

Part III - C Arrays and Pointers

Week Topic Lecture Lab References
11 Nov-07 EXAM II Place: 407-101 Duration: 2 Hours Nov-08 &
Nov-10
Exam Review

포인터 학습법 제출일
12 Nov-14 Review Week 11

Arrays, Functions
READING: KNK 8,9 or K&R 1.6, 4
KNK_C_04_array_functions.pdf
Nov-15 &
Nov-17
Exercise 11
KNK_C_04_array_functions_LAB.pdf
SRC files
13 Nov-21 Review Week 12

Pointers
READING: KNK 11 or K&R 5
KNK_C_05_Pointers.pdf
Nov-22 &
Nov-24
Exercise 12
KNK_C_05_Pointers_Arrays_LAB.pdf
SRC files
14 Nov-28 Review Week 13

Pointers and Arrays
READING: KNK 12
요약자료
포인터와 배열
구조체
Nov-29 &
Dec-01
Exercise 13
15 Dec-05 Review Week 14

Structures
READING: KNK 16 or K&R 6
Review
Dec-6-8 Exercise 14
16 Dec-12 Exam III Place: 407-101 Duration: 2 Hours

Miscellaneous

  • Class A and B will be taught with same text book, class materials, exercises, and assignments. There might be minor differences regarding the teaching methods and use of the time; however, overall layout and the course schedule in both of the classes is the same.
  • Each class is graded separately.

Installing Linux

  • Read the following link to install the linux on your machine
  • If you wish to use virtual machine to run linux then use the following link; beware that your pc must have sufficient computation power.

Installing Python and editors

  • Open terminal via Ctrl+Alt+T or search for "Terminal" from app launcher
  • Type the following to install Python: sudo apt-get update; sudo apt-get install python3.6

You can use vi, emacs, or other IDE to work with python.

  • vi and emacs comes with the operating system distribution; however, the version is not up-to-date. To upgrade the version of the programs type the following: sudo apt-get install vi emacs
  • If you wish to use other IDE, such as pycharm or spyder, you can also install them by typing <code sudo apt-get install spyder
  • When asked password for installing the programs, use your log-in password.


To check if python is installed properly.

James@maker:~$ python
Python 2.7.13 (default, Apr  4 2017, 08:47:57)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello, world")
Hello, world


Useful Sites