CSCI2040: Introduction to Python

General Expectations: Student/Faculty Expectations on Teaching and Learning

Teacher: Prof. John C.S. Lui (The last time I taught this course was in Term 1, 2020).

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

Reference:

Usefule Links:

Course Grades:

IMPORTANT REMINDERS !!!!!!


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.)


Optional: Setting up PyDev for Eclipse

Lecture Notes : I am making all my lecture notes publicly available and they are in Jupyter notebook format. After you download the file, you may need to change it to the ipynb extension.

If you plan to use my Jupyter notebook for your lecture, please make sure to acknowledge my work !!!

Lecture 0: Introduction and setup (Lecture 0)
Lecture 1: Variables, Strings, and Numbers (Lecture 1)
Lecture 2: Lists and Tuples (Lecture 2)
Lecture 3: Functions (Lecture 3)
Lecture 4: If statement and its usage (Lecture 4)
Lecture 5: Loops and Input Functions (Lecture 5)
Lecture 6: Terminal apps and Pickle (Lecture 6)
Lecture 7: Dictionaries (Lecture 7)
Lecture 8: Functions (advanced topic) (Lecture 8)
Lecture 9: Files and utilities (Lecture 9)
Lecture 10: Object-oriented Programming (Lecture 10)
Lecture 11: Functional Programming (Lecture 11)
Lecture 12: Regular Expressions and its processing (Lecture 12)
Lecture 13: NumPy and SciPy (Lecture 13)
Lecture 14: Visualization (Lecture 14)
Lecture 15: Optional topics (Lecture 15)
     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.