計算機程式設計 (Computer Programming)
Learn computer programming in C with this comprehensive course. No prior knowledge required. Video lectures and weekly programming homework will help you practice and master the concepts. Recommended for beginners.
課程介紹 (About the course)
This course will introduce computer programming in C. We will cover basic operations about computer, then move on to how to write computer program in a language called C. Various C concepts will be introduced.
授課形式 (Course format)
We will have video lecture to introduce the concept of programming. The video will switch between the presentation slides and the actual coding process. After that we will have weekly programming homework to ensure that the students are able to practice what they learned from the video presentation. The students will practice on ideone.com, a web platform for compiling and running computer programs.
修課背景要求 (Recommended background)
No special prior computer knowledge is required. However, the students are expected to be able to use a web browser, has basic English vocabulary, and arithmetic skills of junior high school graduates.
What you will learn
Week 1 – Introduction
We start with basic programming concepts that correspond to chapter 1, 2, 3 of the book. We will start with a basic program and gradually add computation statements so that our program will perform useful computation. Also we will use an online interface (ideone) to describe the process of editing, compiling and running a program.
Week 2 – Control Structure
The second week will describe flow control and loops (book chapter 4, 5). After we learn how to write a program to perform basic computation in the first week, we start to learn the control structure of a program. We will learn how to control the execution of a program among several possible “next steps”, and how to repeat the computation to finish repetitive tasks. We will also describe certain loop ending practice, which strongly relates to programming style.
Week 3 – Array
The third week describes arrays and floating point numbers (book chapter 6, 7). We will introduce ways to organize related data into the most basic data structure, i.e., array. We will describe the circumstance of using an array, and the most useful idioms in using them. Various examples will be introduced to enforce the concepts in using array correctly. We will also describe the concept of floating point numbers, which is different from the integers we introduce at the beginning of this course.
Week 4 – Functions
The fourth will will describe the concept of functions (book chapter 8). We will motivate the use of function by system functions, including mathematic and input/output functions, so we the students can understand the key concept that if we can use existing code, then we do not need to reinvent the wheel. Then we will introduce the way to define our own functions. The key mechanism of function call, parameter passing, and return values wiill be discussed by a series of examples.