Python Programming Language

Introduction of Computer Science in Python - Level 2

This computer science course is designed for students in Grade 10. In this course, students will prepare for future computer science courses. In addition to reviewing the Python programming language, we will introduce the Python library from the Python documents, as well as how to utilize it. Students will also learn basic concepts for problem solving in math.  Many problems from Canadian Computing Contest (CCC) from University of Waterloo will be used. Graphic User Interface (GUI) also used in this lectures.


Python source and schedulle

You can download Python and Wing 101 here

Saturday 6pm to 8pm

Canadian Computing Contest (CCC) help page is here

Lecture Notes

Lecture 1

Introduction on Python 3 and Wing 101. There are many Python compilers. We prefer Wing 101 as the student programming environment because Wing 101 is widely used in Academics. Memory model and binary number system will be addressed.

Lecture 2   

Techniques in Loops and selections. Students should know difference between for loop and while, how to use break and continue during looping, what is double loop? For our students, please get,, from your class instructor.

Lecture 3

Many math problems will be used in this lecture. For our students, please get,, from your instructor.   

Lecture 4

In this lecture, students will learn string in Python, how to convert number to string and from string to number. What is ASCII code and how to convert integers to char. Students will get experiences about string like how to loop string and also substring.

Lecture 5

Definition of function, students should know how to define functions in Python including recursive function. Several examples recursive functions will be introduced like factorial and Fibonacci number sequence. Students also learn operations in sequence and series in this lecture. We expect our students gain more math experience than grade 10. 

Lecture 6

Using Python list, in this lecture, students will learn about Python list and operations about Python list. Many problems in Canadian Computing Contest (CCC) will use Python list (or Array in Java). We will go through many problems from CCC problem set.

Lecture 7

More on Python list. In this lecture, we will introduce more built in operations in Python list like remove, append insert, index operation in Python list. Many problems from CCC will be used as example here. 

Lecture 8

Introduction of Python dictionary. In this lecture, students will learn the basic about Python dictionary and operations in Python dictionary. Students will get more experience in higher level problems from CCC problem set.

Lecture 9

Function in Python. In lecture 9, students will learn more about Python functions. Students will learn some important Python built in functions and how to define functions. Many CCC contest from University of Waterloo used.

Lecture 10

Introduction of sorting algorithm. In this lecture, student will learn some important sorting algorithm like bubble sort, selection sort and insertion sorting. Students will have practice in tracing each algorithm and why it is important for sorted list.

Lecture 11

File handling in Python. In this lecture, students will learn how to read file and how to write file, how to use, how to handle BOM (Unicode Byte Order Marker) and more.

Lecture 12

A challenging from CCC contest, University of Waterloo will be used. Students have intensive concept of programming language. Most students should be solve contest around level 3 or 4. How to use CCC grader also be addressed.