Introduction to Computer Programming 2018-02: Difference between revisions

From Innovation
Jump to: navigation, search
No edit summary
 
(79 intermediate revisions by the same user not shown)
Line 4: Line 4:
!Class Info
!Class Info
|-
|-
| '''Class'''  || ETA00086 - 프로그래밍 기초, ETA00087 프로그래밍 기초 실습
| '''Class'''  || ETA00086 - 컴퓨터 프로그래밍 기초, ETA00087 컴퓨터 프로그래밍 기초 실습
|-
|-
| '''Lecturer''' || Seongjin Lee
| '''Lecturer''' || Seongjin Lee
Line 46: Line 46:
There are two must have and one (translation available) recommended books. I also recommend you to read  [http://sunyzero.tistory.com/225 C언어 공부법과 책추천(by sunyzero)] because it gives guide on how to study the language and provides reasons why the first two books are required textbooks. We are going to use the King's book in the class. Kernighan and Ritchie's book provides very short and concise introduction of C language in less than 50 pages, which is very helpful in understanding the capabilities of the language.
There are two must have and one (translation available) recommended books. I also recommend you to read  [http://sunyzero.tistory.com/225 C언어 공부법과 책추천(by sunyzero)] because it gives guide on how to study the language and provides reasons why the first two books are required textbooks. We are going to use the King's book in the class. Kernighan and Ritchie's book provides very short and concise introduction of C language in less than 50 pages, which is very helpful in understanding the capabilities of the language.
#      '''Main''' K.N. King, "C Programming: A Modern Approach," W. W. Norton & Company, 2nd Edition, 2008 [http://www.kyoboacademy.co.kr/academy/product/bookInfo.laf?barcode=9780393979503&ejkGb=ENG 교보문고 바로가기] ('''KNK'''로 표기)
#      '''Main''' K.N. King, "C Programming: A Modern Approach," W. W. Norton & Company, 2nd Edition, 2008 [http://www.kyoboacademy.co.kr/academy/product/bookInfo.laf?barcode=9780393979503&ejkGb=ENG 교보문고 바로가기] ('''KNK'''로 표기)
## Translated version available on the Internet is [http://ziegler.tistory.com/category/프로그래밍%20언어/C%20정리 here]
#    '''Supplementary''' Brian W. Kernighan, Dennis M. Ritchie, "C Programming Language" Prentice Hall, 1988 (2nd Edition) (Kernighan 의 C언어 프로그래밍)  [http://www.kyoboacademy.co.kr/academy/product/instruction/bookInfo.laf?barcode=9788993712674&ejkGb=KOR&univYn=undefined 교보문고 바로가기] ('''K&R'''로 표기)
#    '''Supplementary''' Brian W. Kernighan, Dennis M. Ritchie, "C Programming Language" Prentice Hall, 1988 (2nd Edition) (Kernighan 의 C언어 프로그래밍)  [http://www.kyoboacademy.co.kr/academy/product/instruction/bookInfo.laf?barcode=9788993712674&ejkGb=KOR&univYn=undefined 교보문고 바로가기] ('''K&R'''로 표기)
# '''Supplementary''' Stephen Prata. "C Primer Plus". Sams, 2004 (C 기초 플러스) [http://www.kyoboacademy.co.kr/academy/product/general/bookInfoKor.laf?barcode=9788931553765&ejkGb=KOR 교보문고 바로가기]
# '''Supplementary''' Stephen Prata. "C Primer Plus". Sams, 2004 (C 기초 플러스) [http://www.kyoboacademy.co.kr/academy/product/general/bookInfoKor.laf?barcode=9788931553765&ejkGb=KOR 교보문고 바로가기]


== Homework and Guidelines ==
* Every week, you are to meet with your team and discuss the materials that you are going to master. After the discussion, you are to write the new findings in the [http://piazza.com/gnu.ac.kr/fall2018/eta00086/home piazza].
* Please share [https://docs.google.com/document/d/1LQ4AG_3r1SFJZUnRt7FHX10xBfdzSFx_SsK2jU0BCWs/edit?usp=sharing your email info here].
== Schedule and Readings ==
All pptx files contain narrations and inks, you can view/hear them by entering slide show mode. It is mandatory that you learn them before coming to the class. The class assumes that you have already learn the material for the respective day's activity.
=== Part I - Python ===
{|class="wikitable"
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week - 1 Python
|-
! style="text-align:left;"| Lecture : Sep-03 (月) '''Introduction'''
! style="text-align:left;"| Lab : Sep-07 (金) '''Variables'''
|-
| style="vertical-align: top;"| '''Course Overview'''
* First, we will go through the course overview, and what you have to do to succeed in this class. [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/Day_D01_00_syllabus.pdf  Course Overview]
<br> '''Reading:'''
<br> * On computation and on difference with spoken lanuage and computer language [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D01_01_computation.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D01_01_computation.pdf  [pdf] ]
<br> * Abstract view on python [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D01_02_python.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D01_02_python.pdf  [pdf] ]
<br> * Introduction to Flow Diagram [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D01_03_Flowdiagram.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D01_03_Flowdiagram.pdf  [pdf] ]
<br> '''Workbook:'''
<br> * In class workbook for understanding the concepts of compution (recommend to use github) [http://open.gnu.ac.kr/lecslides/2018-2-introProg/py_ws/WS_01_language.ipynb notebook]
| style="vertical-align: top;"| '''Reading:'''
* Variables, operations, and expressions [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D02_01_variables.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D02_01_variables.pdf  [pdf] ]
<br> '''Workbook:'''
<br> * In class workbook for understanding the concepts of compution (recommend to use github) [http://open.gnu.ac.kr/lecslides/2018-2-introProg/py_ws/WS_02_var.ipynb notebook]
|-
| colspan="2"| '''Video:'''
* Spyder 실행하고 간단한 프로그램 작성하기 (11 min) [[https://www.youtube.com/watch?v=BEnYSxMD9hM&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I watch]]
<br> * Spyder 에서 작성한 코드 파일로 저장하기, 불러오기, 실행하기 (10 min) [[https://www.youtube.com/watch?v=YNaDj-BeM8g&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I&index=2 watch]]
<br> * python에서 변수 사용, 생성하기, 그리고 활용하는 예 (8 min) [[https://www.youtube.com/watch?v=_LLC3Cnc8Bw&index=4&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I&t=0s watch]]
<br> * Python의 연산자 종류와 사용 예 (10 min) [[https://www.youtube.com/watch?v=_T2MD7-Sk6A&t=0s&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I&index=5 watch]]
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week - 2 Python
|-
! style="text-align:left;"| Lecture : Sep-10 (月) '''For Loop'''
! style="text-align:left;"| Lab : Sep-14 (金) '''input function'''
|-
| style="vertical-align: top;"| '''Reading:'''
* for loop is a important building block, and widely used [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D03_01_for.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D03_01_for.pdf  [pdf] ]
<br> * In python, range function controls the number of iterations in for loop [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D03_02_range.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D03_02_range.pdf  [pdf] ]
<br> * flow diagram for the for loop and list [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D03_03_flow_list.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D03_03_flow_list.pdf  [pdf] ]
<br> '''Workbook:'''
<br> * In class workbook for understanding the concepts of for loop (recommend to use github) [http://open.gnu.ac.kr/lecslides/2018-2-introProg/py_ws/WS_03_for.ipynb notebook]
| style="vertical-align: top;"| '''Reading:'''
* Introducing user interaction with input function [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D04_01_input.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D04_01_input.pdf  [pdf] ]
<br> '''Workbook:'''
<br> * In class workbook for understanding the concepts of input (recommend to use github) [http://open.gnu.ac.kr/lecslides/2018-2-introProg/py_ws/WS_04_input.ipynb notebook]
|-
| colspan="2"| '''Video:'''
* for 문장과  range 함수의 활용 (10 min) [[https://www.youtube.com/watch?v=IcIRxcYHH-I&t=0s&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I&index=6 watch]]
<br> * input 함수의 활용과 입력한 값의 형의 이해 (9 min) [[https://www.youtube.com/watch?v=HQ06_ThCMkY&t=0s&index=7&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I watch]]
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week - 3 Python
|-
! style="text-align:left;"| Lecture : Sep-17 (月) '''if conditions'''
! style="text-align:left;"| Lab : Sep-21 (金) '''while loop'''
|-
| style="vertical-align: top;"| '''Reading:'''
* Evaluation of expression and logical operators [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D05_01_TF.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D05_01_TF.pdf  [pdf] ]
<br> * Controlling flow of a program with if and else [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D05_02_flow_cond.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D05_02_flow_cond.pdf  [pdf] ]
<br> * Introducing randomness to a program [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D05_03_random.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D05_03_random.pdf  [pdf] ]
<br> '''Workbook:'''
<br> * In class workbook for understanding the concepts of flow of a program (recommend to use github) [http://open.gnu.ac.kr/lecslides/2018-2-introProg/py_ws/WS_05_cond.ipynb notebook]
| style="vertical-align: top;"| '''Reading:'''
* Another method of making a loop [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D06_01_while.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D06_01_while.pdf  [pdf] ]
<br> * flow diagram for while function [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D06_02_flow_while.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D06_02_flow_while.pdf  [pdf] ]
<br> '''Workbook:'''
<br> * In class workbook for understanding the concepts of while loop (recommend to use github) [http://open.gnu.ac.kr/lecslides/2018-2-introProg/py_ws/WS_06_while.ipynb notebook]
|-
| colspan="2"| '''Video:'''
* if 문장으로 조건 비교하여 실행하기 (15 min) [[https://www.youtube.com/watch?v=Czlotwgg0P0&t=46s&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I&index=8 watch]]
<br> * for 문과 유사한 기능의 while문으로 반복 동작을 더 정교하게 조정하기 (7 min) [[https://www.youtube.com/watch?v=bSXZttF79xM&t=0s&index=9&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I watch]]
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week - 4 Python
|-
! style="text-align:left;"| Lecture : Sep-24 (月)
! style="text-align:left;"| Lab : Sep-28 (金) '''Custom Functions'''
|-
| '''추석 연휴'''
| style="vertical-align: top;"| '''Reading:'''
* Dividing the code into functions to reduce the duplicate codes [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D07_01_func.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D07_01_func.pdf  [pdf] ]
<br> * Example of using function [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D07_02_func_ex.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D07_02_func_ex.pdf  [pdf] ]
<br> * flow diagram on function [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_rec/ICP_D07_03_flow_func.pptx  [pptx] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/slides_py_pdf/ICP_D07_03_flow_func.pdf  [pdf] ]
<br> '''Workbook:'''
<br> * In class workbook for understanding the concepts of flow of a program (recommend to use github) [http://open.gnu.ac.kr/lecslides/2018-2-introProg/py_ws/WS_07_function.ipynb notebook]
|-
| colspan="2"| '''Video:'''
* 함수의 작성의 문법과 활용의 예와 자기 자신을 다시 부르는 재귀함수의 예 (11 min) [[https://www.youtube.com/watch?v=eWNhiCgqR94&list=PLWm33cHVRby6FzafIXpZLxMTIIjBTN49I&index=10&t=0s watch]]
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week - 5 Python
|-
! style="text-align:left;"| Lecture : Oct-01 (月) '''Review'''
! style="text-align:left;"| Lab : Oct-05 (金) '''Exam I'''
|-
| style="vertical-align: top;"| '''Workbook:'''
* Practice before the exam [http://open.gnu.ac.kr/lecslides/2018-2-introProg/py_ws/WS_08_overall.ipynb  notebook]
| style="vertical-align: top;"| '''Exam'''
* Place : 407-101
* Time : 14:00-16:00
|}
=== Part II - C Fundamentals ===
{|class="wikitable"
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 6 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Oct-08 (月) '''Introduction'''
! width=50% ; style="text-align:left;"| Lab : Oct-12 (金) '''Variables'''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Reading:'''
* The essential basics of getting to know the C language: pre-processing, compile, variables, linking (adapted from 6.s096 MIT) [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/MIT6_S096_IAP13_lec1.pdf  [pdf] ]
<!-- Friday -->
| style="vertical-align: top;"| '''Reading:'''
* Introduction to C programming [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C01_intro_kor.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C01_intro_kor.pdf  [pdf] ]
|-
| colspan="2"  text-align:left;"| '''Video:'''
* Introduction to C programming [https://www.youtube.com/watch?v=XDlux67CLTM&t=0s&list=PLWm33cHVRby7GeGFaFP4vVDQSW4_vRbFI  [watch] ] (44m)
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 7 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Oct-15 (月) '''printf and scanf'''
! width=50% ; style="text-align:left;"| Lab : Oct-19 (金) '''Excercises on printf and scanf'''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Reading:'''
* To read user inputs and print texts on screen [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C02_form_IO_kor.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C02_form_IO_kor.pdf  [pdf] ]
<br> '''Worksheet:'''
<br> * Formatted input and output [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C02a_form_io.ipynb  [worksheet] ]
<!-- Friday -->
| style="vertical-align: top;"| '''Worksheet:'''
* printf in detail [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C02b_printf.ipynb  [worksheet] ]
<br> * scanf in detail [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C02c_scanf.ipynb  [worksheet] ]
|-
| colspan="2"  text-align:left;"| '''Video:'''
* Formatted input and output [https://www.youtube.com/watch?v=xK8JDpbC9x8&list=PLWm33cHVRby7GeGFaFP4vVDQSW4_vRbFI&index=2  [watch] ] (30m)
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 8 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Oct-22 (月) '''expressions'''
! width=50% ; style="text-align:left;"| Lab : Oct-26 (金) '''if -else and switch cases'''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Reading:'''
* Expresions and Operators [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C03_Expr_kor.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C03_Expr_kor.pdf  [pdf] ]
<br> '''Worksheet:'''
<br> * Expresions and Operators [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C03_var_as.ipynb  [worksheet] ]
<!-- Friday -->
| style="vertical-align: top;"| '''Reading:'''
* if-else and switch cases [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C04_if_switch_kor.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C04_if_switch_kor.pdf  [pdf] ]
<br> '''Worksheet:'''
<br> * if-else [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C04a_if.ipynb  [worksheet] ]
<br> * switch case [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C04b_switch.ipynb  [worksheet] ]
|-
| colspan="2"  text-align:left;"| '''Video:'''
* Selection Statement [https://www.youtube.com/watch?v=0qxVW_6Cg4w&list=PLWm33cHVRby7GeGFaFP4vVDQSW4_vRbFI&index=4  [watch] ] (44m)
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 9 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Oct-29 (月) '''Control Flow Statements'''
! width=50% ; style="text-align:left;"| Lab : Nov-02 (金) '''Excercises on control flow statements'''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Reading:'''
* Summary on control flow [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C05_cf_sum.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C05_cf_sum.pdf  [pdf] ]
<br> * Control flow statements [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C05_cf.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C05_cf.pdf  [pdf] ]
<br> '''Worksheet:'''
<br> * in class excercises with pencil and papers
<!-- Friday -->
| style="vertical-align: top;"| '''Worksheet:'''
* for loop [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C05a_for.ipynb  [worksheet] ]
<br> * while loop [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C05b_while.ipynb  [worksheet] ]
<br> * do…while loop [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C05c_do-while.ipynb  [worksheet] ]
<br> * break; continue; goto [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C05d_br_con_goto.ipynb  [worksheet] ]
|-
| colspan="2"  text-align:left;"| '''Video:'''
* On Control flow [https://www.youtube.com/watch?v=wTeFGICePUc  [watch] ] (58m)
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 10 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Nov-05 (月) '''Arrays'''
! width=50% ; style="text-align:left;"| Lab : Nov-09 (金) '''Arrays Review and Functions'''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Reading:'''
* Summary on array [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C06_arr_sum.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C06_arr_sum.pdf  [pdf] ]
<br> * Array [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C06_arr.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C06_arr.pdf  [pdf] ]
<br> '''Worksheet:'''
<br> * array [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C06_array.ipynb  [worksheet] ]
<br>
<br><font color="red"> '''Assignemnt:'''
<br> * description on [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_hw/HW_CF.ipynb  [description] ]
<br> * Due: Nov-19 (Mon) before class
<br> * submit through piazza </font>
<!-- Friday -->
| style="vertical-align: top;"| '''Review and Reading:'''
<br> * Recap on Array
<br> * Summary on Fuctions [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C07_func_sum.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C07_func_sum.pdf  [pdf] ]
<br> * Details of Functions [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C07_func.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C07_func.pdf  [pdf] ]
<br> '''Worshop:'''
<br> * In class exercise [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C07_func.ipynb  [worksheet] ]
|}
=== Part III - C Arrays and Pointers ===
{|class="wikitable"
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 11 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Nov-12 (月) ''' Exam II '''
! width=50% ; style="text-align:left;"| Lab : Nov-16 (金) ''' Fucntions: Exercise '''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Exam II:'''
* Place: 국제어학원 오디토리움
<br> * Time: 14:00-16:00
<!-- Friday -->
| style="vertical-align: top;"| '''Worksheet:'''
* Functions [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C07_func.ipynb  [worksheet] ]
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 12 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Nov-19 (月) ''' Pointers '''
! width=50% ; style="text-align:left;"| Lab : Nov-23 (金) ''' Pointers: Exercises '''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Reading:'''
* Pointers Summary [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C08_Pointers_sum.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C08_Pointers_sum.pdf  [pdf] ]
<br> * Pointers in details [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C08_Pointers.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C08_Pointers.pdf  [pdf] ]
<br> '''Worksheet:'''
<br> * In class excercises with pencil and paper
<!-- Friday -->
| style="vertical-align: top;"| '''Worksheet:'''
* Excercises on Pointers [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C08_pointer.ipynb  [worksheet] ]
<br><font color="red"> '''Assignment:'''
<br> * Due date: Two weeks from today
<br> * Submit through Piazza (code, description, result screen capture)
<br> * Assignment Specification [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_hw/HW_Secret_Map.ipynb  [is here] ] </font>
|-
| colspan="2"  text-align:left;"| '''Video:'''
* Pointer Animation (Stanford Univ.) [https://www.youtube.com/watch?v=5VnDaHBi8dM  [watch] ] (3m)
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 13 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Nov-26 (月) ''' Pointers and Arrays '''
! width=50% ; style="text-align:left;"| Lab : Nov-30 (金) ''' Pointers and Arrays: Excercises '''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Reading:'''
* Pointers and Arrays Summary [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C09_Pointers_Arrays_sum.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C09_Pointers_Arrays_sum.pdf  [pdf] ]
<br> * Pointers and Arrays [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C09_Pointers_Arrays.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C09_Pointers_Arrays.pdf  [pdf] ]
<!-- Friday -->
| style="vertical-align: top;"| '''Worksheet:'''
* Pointers and Arrays Worksheet [http://open.gnu.ac.kr/lecslides/2018-2-introProg/c_ws/C09_pointer_arr.ipynb  [worksheet] ]
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 14 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Dec-03 (月) ''' Structures '''
! width=50% ; style="text-align:left;"| Lab : Dec-07 (金) ''' Structures: Excercises '''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Reading:'''
* Structures Summary [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C10_Structures_sum.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C10_Structures_sum.pdf  [pdf] ]
<br> * Structures [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c/KNK_C10_Structures.pptx  [ppt] ] [http://open.gnu.ac.kr/lecslides/2018-2-introProg/Slides_c_pdf/KNK_C10_Structures.pdf  [pdf] ]
<br> '''Worksheet:'''
<br> *
<!-- Friday -->
| style="vertical-align: top;"| '''Worksheet:'''
* Excercises on Structures
<br> *
|-
|-
! colspan="2" style="background: Turquoise; text-align:left;"| Week 15 - on C Language
|-
! width=50% ; style="text-align:left;"| Lecture : Dec-10 (月) ''' Review '''
! width=50% ; style="text-align:left;"| Lab : Dec-14 (金) ''' Exam '''
|-
<!-- Monday -->
| style="vertical-align: top;"| '''Review:'''
* Review of Functions, Pointers, Structures
<!-- Friday -->
| style="vertical-align: top;"| '''Exam III'''
* Place: 407-101
* Time: 12:00-14:00
|}
== Miscellaneous ==
* A and B Group will be taught with the same text book, class materials, exercises, and assignments. 
* Each class is graded separately.
*      You are to join piazza through [http://piazza.com/gnu.ac.kr/fall2018/eta00086 here]


==Evaluation==
==Evaluation==
Line 57: Line 380:
!Ratio
!Ratio
|-
|-
|Attendance ||10 || Exam I || 20
|Attendance ||15 || Exam I || 20
|-
|-
| Assignments || 20 || Exam II || 20
| Before Class Meet-up Report || 15 || Exam II || 20
|-
|-
| || || Exam III || 20
| Assignments || 10 || Exam III || 20
|-
|-
| || || Total || 100%
| || || Total || 100%
|}
 
== Homework and Guidelines ==
* Every week, you are to write detailed report on three concepts, one page for each concept. Download the [http://open.gnu.ac.kr/lecslides/2017-2-introProg/template/weekly_template.docx 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.
 
* Your [https://docs.google.com/document/d/1O2TzeM74JKhpIAqtyyMSVDSIgGnjMbArwUx_eQyhqi4/edit?usp=sharing INFO]
 
== Schedule and Readings ==
=== Part I - Python ===
{|class="wikitable"
! Week !! Topic !! Lecture !! !! Lab !! !! References
|-
| 1 || Python || Aug-29 || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-01.pdf  Course Overview] &  [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-01a-Flowdiagram.pdf  Flow Diagram] <br>'''Reading''':  <br>Day01  || Aug-30 &<br> Aug-01 || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-02.pdf  Variables D02-03, Operations and variables]  <br>'''Reading''':  <br>Day02 간단한 프로그램 만들기 <br>Day03 연산과 변수 <br><br>'''HW'''<br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/HW/w01-HW-n01.pdf HW No1] || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch01.pdf TP2-Ch01: 프로그래밍의 정도] <br>
[http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch02.pdf TP2-Ch02: 변수와 수식 그리고 문장]
|-
| 2 || || Sep-05 || '''[[Intro. to Prog. Lange. Review Week 1| Review Week 1]]''' <br><br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-03a-Flowdiagram.pdf  Flow Diagram on loops]<br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-03.pdf D04-05 for Loops] <br>'''Reading''':  <br>Day04 for 명령을 사용하여 똑같은 작업 반복하기 <br>Day05 range 명령을 사용하여 변화를 주면서 반복하기 || Sept-06 &<br> Sept-08 || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-04.pdf D06-07 Drawing and Input] <br>'''Reading''': <br>Day06 거북이 그래픽으로 그림 그리기  <br>Day07 정보 입력하기 <br><br>'''HW'''<br> <!--[http://open.gnu.ac.kr/lecslides/2017-2-introProg/HW/w02-HW-n02.pdf HW No2] --> || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/book/TP2_Ch05.pdf TP2-Ch05: 조건문과 재귀문] 
|-
| 3 || || Sep-12 || '''[[Intro. to Prog. Lange. Review Week 2| Review Week 2]]''' <br><br> [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-05.pdf D08-09 Condition, Random] <br>[http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-05a-Flowdiagram.pdf  Flow Diagram on conditions]  <br>'''Reading''':  <br>Day08 True/False 판단하기 <br>Day09 random 모듈로 임의의 수 뽑기 || Sept-13 &<br> Sept-15 || [http://open.gnu.ac.kr/lecslides/2017-2-introProg/IPL-python-06.pdf D13-14 거북이 응용과 계산 게임] <br> '''Reading''':  <br>Day13 거북이 그래픽 응용하기 <br>Day14 계산 맞히기 게임 만들기 ||
|-
| 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_Ch06.pdf TP2-Ch06: 결과가 있는 함수]
|-
| 6 || C || Oct-03 || 추석 || Oct-4-6 || 추석 ||
|}
|}


=== Part II - C Fundamentals ===
== Setup Instructions ==
{|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 & [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>[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, 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>[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 <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 <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 <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<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 <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 || || ||
|}


== 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 ===
=== Step 1: Installing Linux ===
* Read the following [http://recipes4dev.tistory.com/112 link] to install the linux on your machine
* Read the following [http://recipes4dev.tistory.com/112 link] to install the linux on your machine
* If you wish to use virtual machine to run linux then use the following [https://extrememanual.net/7223 link]; beware that your pc must have sufficient computation power.
* If you wish to use virtual machine to run linux then use the following [https://extrememanual.net/7223 link]; beware that your pc must have sufficient computation power.


=== Installing Python and editors ===
* Open terminal via <code> Ctrl+Alt+T</code> or search for "Terminal" from app launcher
* Type the following to install Python: </code> sudo apt-get update; sudo apt-get install python3.6


You can use vi, emacs, or other IDE to work with python.
=== Step 2: Installing Python and C ===
* 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: <code> sudo apt-get install vi emacs</code>
==== Python ====
* 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</code>
===== Linux =====
* When asked password for installing the programs, use your log-in password.
* Open terminal via <code> Ctrl+Alt+T</code> or search for "Terminal" from app launcher in Linux
* Type the following to install Python:
*; <code> sudo apt-get update; sudo apt-get install python3.6 </code>


To check if python is installed properly.


To check if python is installed properly.
<source>
<source>
James@maker:~$ python
James@maker:~$ python
Line 151: Line 416:
</source>
</source>


===== Windows =====
Download and install python for windows from  [https://www.python.org/downloads/windows/ here]


=== Useful Sites ===
==== C ====
===== Linux =====
C in Linux is prebuilt into the system; however, on windows it is not.
If C compiler is not installed in the system then follow the steps in the terminal <code>Ctrl+Alt+t</code>.
<source>
sudo apt-get update # 패키지 리스트 최신화
sudo apt-get upgrade # 패키지 업그레이드
sudo apt-get install build-essential # 컴파일러 환경 설치
gcc -v # gcc 설치 버전 확인
make -v # make 설치 버전 확인
</source>
 
===== Windows =====
Follow the description on [http://goproprada.tistory.com/387 here]
=== Step 3: Installing Jupyter Notebook ===
==== Option 1: Installation via Anaconda ====
It is recommended that you install Jupyter Notebook via Anaconda
# Download & install Anaconda for Python [https://www.anaconda.com/download here]
# Run <code>jupyter notebook</code> to confirm that it is properly installed
 
If Anaconda doesn't have jupyter:
you can try running
 
<code>conda install jupyter</code>
 
 
==== Option 2: Installation via <code>pip</code> ====
You can also install via the python package manager <code>pip</code>
# Make sure you have installed
#* <code>python</code> and <code>pip</code>
# Make sure <code>pip</code> is updated to its latest version
#; <code>pip install --user --upgrade pip</code>
# Install Jupyter Notebook
#; <code>pip install --user --upgrade jupyter</code>
 
 
 
=== Step 3: Installing Other Dependencies ===
 
 
==== Git ====
 
Git is a version control system which we use to store the various course material; you can download from [https://git-scm.com/downloads here]
 
* you can download the course material from [https://github.com/resourceful/icp here]
* If you want the up-to-date version of the course material, checkout the course repository from the git by typing the following command
** <code> git clone https://github.com/resourceful/ICP </code>
 
==== IDE ====
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</code>
 
* When asked password for installing the programs, use your log-in password.
 
 
==== Installing Vi or emacs: the editors====
 
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:
 
<code> sudo apt-get install vi emacs</code>
 
* When asked password for installing the programs, use your log-in password.
 
 
=== Step 4: Getting Started ===
 
 
==== Getting the latest course materials ====
You can always access the latest course materials on the course website. You can download all at once and keep them synced by using git. To get started with this, run:
 
<code> git clone https://github.com/resourceful/ICP.git </code>
 
Now you should have all the materials in ''Introduction to Computer Programming''; to get the latest version, run the following command in the repository.
 
<code>git pull</code>
 
 
==== To read the notebook ====
In the directory where the relevant course materials are, run:
 
<code>jupyter notebook</code>
 
== Useful Sites ==
* https://www.codesdope.com/ - Well documented online learning site for a number of programming languages.
* https://www.codesdope.com/ - Well documented online learning site for a number of programming languages.
* https://cs50.harvard.edu - People say CS50 in hazard is "Demanding, but definitely doable. Social, but educational. A focused topic, but broadly applicable skills. CS50 is the quintessential Harvard (and Yale!) course." There video lectures on c and its applications are really helpful.
* https://cs50.harvard.edu - People say CS50 in hazard is "Demanding, but definitely doable. Social, but educational. A focused topic, but broadly applicable skills. CS50 is the quintessential Harvard (and Yale!) course." There video lectures on c and its applications are really helpful.
Line 159: Line 510:
* [https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-087-practical-programming-in-c-january-iap-2010/ Practical Programming in C MIT] - Yet, another lecture on C
* [https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-087-practical-programming-in-c-january-iap-2010/ Practical Programming in C MIT] - Yet, another lecture on C
* [https://web.stanford.edu/class/archive/cs/cs107/cs107.1166/ cs107 Stanford (archived, 2016)] - For deeper understanding of C and its relationship with the system.
* [https://web.stanford.edu/class/archive/cs/cs107/cs107.1166/ cs107 Stanford (archived, 2016)] - For deeper understanding of C and its relationship with the system.


<!--
<!--

Latest revision as of 10:03, 3 December 2018

Class Information

Class Info
Class ETA00086 - 컴퓨터 프로그래밍 기초, ETA00087 컴퓨터 프로그래밍 기초 실습
Lecturer Seongjin Lee
Time and Place A & B Group (Theory): 407-101 Monday 14:00-16:00
A Group (Practice): 407-203, Friday 12:00-14:00
B Group (Practice): 407-203, Friday 14:00-16: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. Kyounghoon Kim is teaching the same course. 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 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 (translation available) recommended books. I also recommend you to read C언어 공부법과 책추천(by sunyzero) because it gives guide on how to study the language and provides reasons why the first two books are required textbooks. We are going to use the King's book in the class. Kernighan and Ritchie's book provides very short and concise introduction of C language in less than 50 pages, which is very helpful in understanding the capabilities of the language.

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

Homework and Guidelines

  • Every week, you are to meet with your team and discuss the materials that you are going to master. After the discussion, you are to write the new findings in the piazza.
  • Please share your email info here.

Schedule and Readings

All pptx files contain narrations and inks, you can view/hear them by entering slide show mode. It is mandatory that you learn them before coming to the class. The class assumes that you have already learn the material for the respective day's activity.

Part I - Python

Week - 1 Python
Lecture : Sep-03 (月) Introduction Lab : Sep-07 (金) Variables
Course Overview

* First, we will go through the course overview, and what you have to do to succeed in this class. Course Overview
Reading:
* On computation and on difference with spoken lanuage and computer language [pptx ] [pdf ]
* Abstract view on python [pptx ] [pdf ]
* Introduction to Flow Diagram [pptx ] [pdf ]
Workbook:
* In class workbook for understanding the concepts of compution (recommend to use github) notebook

Reading:

* Variables, operations, and expressions [pptx ] [pdf ]
Workbook:
* In class workbook for understanding the concepts of compution (recommend to use github) notebook

Video:

* Spyder 실행하고 간단한 프로그램 작성하기 (11 min) [watch]
* Spyder 에서 작성한 코드 파일로 저장하기, 불러오기, 실행하기 (10 min) [watch]
* python에서 변수 사용, 생성하기, 그리고 활용하는 예 (8 min) [watch]
* Python의 연산자 종류와 사용 예 (10 min) [watch]

Week - 2 Python
Lecture : Sep-10 (月) For Loop Lab : Sep-14 (金) input function
Reading:

* for loop is a important building block, and widely used [pptx ] [pdf ]
* In python, range function controls the number of iterations in for loop [pptx ] [pdf ]
* flow diagram for the for loop and list [pptx ] [pdf ]
Workbook:
* In class workbook for understanding the concepts of for loop (recommend to use github) notebook

Reading:

* Introducing user interaction with input function [pptx ] [pdf ]
Workbook:
* In class workbook for understanding the concepts of input (recommend to use github) notebook

Video:

* for 문장과 range 함수의 활용 (10 min) [watch]
* input 함수의 활용과 입력한 값의 형의 이해 (9 min) [watch]

Week - 3 Python
Lecture : Sep-17 (月) if conditions Lab : Sep-21 (金) while loop
Reading:

* Evaluation of expression and logical operators [pptx ] [pdf ]
* Controlling flow of a program with if and else [pptx ] [pdf ]
* Introducing randomness to a program [pptx ] [pdf ]
Workbook:
* In class workbook for understanding the concepts of flow of a program (recommend to use github) notebook

Reading:

* Another method of making a loop [pptx ] [pdf ]
* flow diagram for while function [pptx ] [pdf ]
Workbook:
* In class workbook for understanding the concepts of while loop (recommend to use github) notebook

Video:

* if 문장으로 조건 비교하여 실행하기 (15 min) [watch]
* for 문과 유사한 기능의 while문으로 반복 동작을 더 정교하게 조정하기 (7 min) [watch]

Week - 4 Python
Lecture : Sep-24 (月) Lab : Sep-28 (金) Custom Functions
추석 연휴 Reading:

* Dividing the code into functions to reduce the duplicate codes [pptx ] [pdf ]
* Example of using function [pptx ] [pdf ]
* flow diagram on function [pptx ] [pdf ]
Workbook:
* In class workbook for understanding the concepts of flow of a program (recommend to use github) notebook

Video:

* 함수의 작성의 문법과 활용의 예와 자기 자신을 다시 부르는 재귀함수의 예 (11 min) [watch]

Week - 5 Python
Lecture : Oct-01 (月) Review Lab : Oct-05 (金) Exam I
Workbook:

* Practice before the exam notebook

Exam

* Place : 407-101 * Time : 14:00-16:00

Part II - C Fundamentals

Week 6 - on C Language
Lecture : Oct-08 (月) Introduction Lab : Oct-12 (金) Variables
Reading:

* The essential basics of getting to know the C language: pre-processing, compile, variables, linking (adapted from 6.s096 MIT) [pdf ]

Reading:

* Introduction to C programming [ppt ] [pdf ]

Video:

* Introduction to C programming [watch ] (44m)

Week 7 - on C Language
Lecture : Oct-15 (月) printf and scanf Lab : Oct-19 (金) Excercises on printf and scanf
Reading:

* To read user inputs and print texts on screen [ppt ] [pdf ]
Worksheet:
* Formatted input and output [worksheet ]

Worksheet:

* printf in detail [worksheet ]
* scanf in detail [worksheet ]

Video:

* Formatted input and output [watch ] (30m)

Week 8 - on C Language
Lecture : Oct-22 (月) expressions Lab : Oct-26 (金) if -else and switch cases
Reading:

* Expresions and Operators [ppt ] [pdf ]
Worksheet:
* Expresions and Operators [worksheet ]

Reading:

* if-else and switch cases [ppt ] [pdf ]
Worksheet:
* if-else [worksheet ]
* switch case [worksheet ]

Video:

* Selection Statement [watch ] (44m)

Week 9 - on C Language
Lecture : Oct-29 (月) Control Flow Statements Lab : Nov-02 (金) Excercises on control flow statements
Reading:

* Summary on control flow [ppt ] [pdf ]
* Control flow statements [ppt ] [pdf ]
Worksheet:
* in class excercises with pencil and papers

Worksheet:

* for loop [worksheet ]
* while loop [worksheet ]
* do…while loop [worksheet ]
* break; continue; goto [worksheet ]

Video:

* On Control flow [watch ] (58m)

Week 10 - on C Language
Lecture : Nov-05 (月) Arrays Lab : Nov-09 (金) Arrays Review and Functions
Reading:

* Summary on array [ppt ] [pdf ]
* Array [ppt ] [pdf ]
Worksheet:
* array [worksheet ]

Assignemnt:
* description on [description ]
* Due: Nov-19 (Mon) before class
* submit through piazza

Review and Reading:


* Recap on Array
* Summary on Fuctions [ppt ] [pdf ]
* Details of Functions [ppt ] [pdf ]
Worshop:
* In class exercise [worksheet ]

Part III - C Arrays and Pointers

Week 11 - on C Language
Lecture : Nov-12 (月) Exam II Lab : Nov-16 (金) Fucntions: Exercise
Exam II:

* Place: 국제어학원 오디토리움
* Time: 14:00-16:00

Worksheet:

* Functions [worksheet ]

Week 12 - on C Language
Lecture : Nov-19 (月) Pointers Lab : Nov-23 (金) Pointers: Exercises
Reading:

* Pointers Summary [ppt ] [pdf ]
* Pointers in details [ppt ] [pdf ]
Worksheet:
* In class excercises with pencil and paper

Worksheet:

* Excercises on Pointers [worksheet ]
Assignment:
* Due date: Two weeks from today
* Submit through Piazza (code, description, result screen capture)
* Assignment Specification [is here ]

Video:

* Pointer Animation (Stanford Univ.) [watch ] (3m)

Week 13 - on C Language
Lecture : Nov-26 (月) Pointers and Arrays Lab : Nov-30 (金) Pointers and Arrays: Excercises
Reading:

* Pointers and Arrays Summary [ppt ] [pdf ]
* Pointers and Arrays [ppt ] [pdf ]

Worksheet:

* Pointers and Arrays Worksheet [worksheet ]


Week 14 - on C Language
Lecture : Dec-03 (月) Structures Lab : Dec-07 (金) Structures: Excercises
Reading:

* Structures Summary [ppt ] [pdf ]
* Structures [ppt ] [pdf ]
Worksheet:
*

Worksheet:

* Excercises on Structures
*

Week 15 - on C Language
Lecture : Dec-10 (月) Review Lab : Dec-14 (金) Exam
Review:

* Review of Functions, Pointers, Structures

Exam III

* Place: 407-101 * Time: 12:00-14:00

Miscellaneous

  • A and B Group will be taught with the same text book, class materials, exercises, and assignments.
  • Each class is graded separately.
  • You are to join piazza through here

Evaluation

Categories Ratio Categories Ratio
Attendance 15 Exam I 20
Before Class Meet-up Report 15 Exam II 20
Assignments 10 Exam III 20
Total 100%

Setup Instructions

Step 1: 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.


Step 2: Installing Python and C

Python

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

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
Windows

Download and install python for windows from here

C

Linux

C in Linux is prebuilt into the system; however, on windows it is not. If C compiler is not installed in the system then follow the steps in the terminal Ctrl+Alt+t.

sudo apt-get update # 패키지 리스트 최신화
sudo apt-get upgrade # 패키지 업그레이드
sudo apt-get install build-essential # 컴파일러 환경 설치
gcc -v # gcc 설치 버전 확인
make -v # make 설치 버전 확인
Windows

Follow the description on here

Step 3: Installing Jupyter Notebook

Option 1: Installation via Anaconda

It is recommended that you install Jupyter Notebook via Anaconda

  1. Download & install Anaconda for Python here
  2. Run jupyter notebook to confirm that it is properly installed

If Anaconda doesn't have jupyter: you can try running

conda install jupyter


Option 2: Installation via pip

You can also install via the python package manager pip

  1. Make sure you have installed
    • python and pip
  2. Make sure pip is updated to its latest version
    pip install --user --upgrade pip
  3. Install Jupyter Notebook
    pip install --user --upgrade jupyter


Step 3: Installing Other Dependencies

Git

Git is a version control system which we use to store the various course material; you can download from here

  • you can download the course material from here
  • If you want the up-to-date version of the course material, checkout the course repository from the git by typing the following command

IDE

If you wish to use other IDE, such as pycharm or spyder, you can also install them by typing

sudo apt-get install spyder

  • When asked password for installing the programs, use your log-in password.


Installing Vi or emacs: the editors

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

  • When asked password for installing the programs, use your log-in password.


Step 4: Getting Started

Getting the latest course materials

You can always access the latest course materials on the course website. You can download all at once and keep them synced by using git. To get started with this, run:

git clone https://github.com/resourceful/ICP.git

Now you should have all the materials in Introduction to Computer Programming; to get the latest version, run the following command in the repository.

git pull


To read the notebook

In the directory where the relevant course materials are, run:

jupyter notebook

Useful Sites