CSCI2040: Introduction to Python
General Expectations:
Student/Faculty Expectations on Teaching and Learning
Teacher:
Prof. John C.S. Lui
This is a 2-unit course which provides an introduction to Python.
It is designed to give students fluency in Python, its programming paradigm
(such as object-oriented programming and functional programming style),
its data structures, as well as various modules and libraries (e.g., NumPy, SciPy, mathplotlib,..etc).
The course consists of both lectures and labs with students
doing sample Python problems. Problem-based Python assignments will be
given which require significant time on Python programming.
IMPORTANT: We assume you have some programming experience and background.
Note that Python is one of the "TOP THREE" programming languages nowaday. Many companies
are now using Python (e.g., Google, Facebook, Tencent,..etc), and Python is
considered an essential programming language for big data analytics and machine learning.
In fact, for the course
CSCI3320 (Fundamentals of Machine Learning),
it uses the Python language.
Important reminder:
Students need to spend time to read resources on the Internet,
do the homework, attend the lectures and labs so
to understand and keep pace with this course.
Teaching Assistants
- Mr. Wang Xuchuang
Office hour: Thurs. 10:00 am to noon. Office, HSH Eng Bldg, Room 120. (Email: xcwang@cse.cuhk.edu.hk)
- Miss Shiyuan Zheng
Office hour: Wed. 02:00-04:00 pm. Office, HSH Eng Bldg, Room 120. (Email: syzheng@cse.cuhk.edu.hk)
- Miss. Maoli Liu
Office hour: Fri. 10:00 am t0 noon. Office, HSH Eng Bldg, Room 120. (Email: mlliu@cse.cuhk.edu.hk)
Reference:
Usefule Links:
Course Grades:
- Programming exercises: 40%
- Exam: 60%
Important note:
Students need to get at least 30% in the final exam to pass, independent
of their performance in programming exercises.
IMPORTANT REMINDERS !!!!!!
- No lab during the first week of classes. The first lab will be held on the week of Sept XXth, 2020.
- FINAL EXAM: It will be on December 5th, 2020 (morning). The venue will be
decided later.
Policies:
Outline for the course:
(Note: I usually prepare more materials
than we can cover in a semester. I will leave those materials I can't
cover to students as a self-learning tool.)
- Introduction: installation, variables, operators, control, list..., etc.
- Variables, strings, numbers, basic operations.
- Lists and tuples and their operators.
- Functions
- Conditional statement (e.g., if)
- Loops and input functions
- Terminal applicattions and Pickle
- Dictionaries
- Object-Oriented Programming (OOP)
- Functional Programming (FP)
- Regular expressions and processing
- Modules
- Files and various utilities (e.g., system, compression)
- Introduction to Numpy and Scipy
- Visualization (e.g., mathplotlib)
- Optional topics
- Templates in Python
- Argparse in Python
- MultiThreading in Python
- Networking in Python
- C Extension in Python
- PyCrypto in Python
- A brief look at machine learning
- Special topic: Blockchains (if time allows)
Optional: Setting up PyDev for Eclipse
Lecture Notes
(Lecture Notes are available at CUHK Blackboard (https://blackboard.cuhk.edu.hk/))
-
Lecture 0: Introduction and setup
-
Lecture 1: Variables, Strings, and Numbers
-
Lecture 2: Lists and Tuples
-
Lecture 3: Functions
-
Lecture 4: If statement and its usage
-
Lecture 5: Loops and Input Functions
-
Lecture 6: Terminal apps and Pickle
-
Lecture 7: Dictionaries
-
Lecture 8: Functions (advanced topic)
-
Lecture 9: Object-oriented Programming
-
Lecture 10: Functional Programming
-
Lecture 11: Regular Expressions and its processing
-
Lecture 12: Files and utilities
-
Lecture 13: NumPy and SciPy
-
Lecture 14: Visualization
-
Lecture 14: Optional topics (if time allows)
- Templates in Python
- Argparse in Python
- Multithreading in Python
- Networking in Python
- C Extension in Python
- Cryptography in Python
-
Lecture 15: Advanced topics: Blockchains (if time allows)
Lab Exercises
-
Please go to the "Blackboard" to access the specification and testing script of all labs.