Skip to main content Start main content

Workshop: Introduction to Python programming for non-programmer II (Evening)

Workshop/ Training/ Webinar

  • Date

    21 - 28 Sep 2022

  • Organiser

    ITS

  • Time

    18:00 - 20:30

  • Venue

    Online (MS Teams)  

Summary

In this evening class, recorded videos will be arranged while facilitators will interact with participants real-time. Interested students should not miss it.

 

Introduction to Python programming for non-programmer II (2 lessons)

Date: 21 Sep and 28 Sep

Time: 18:00 - 20:30

Target Audience: All Students

Medium of Instruction: English

Pre-requisite: Preferably taken "Workshop: Introduction to Python programming for non-programmer I"


What you will learn

  • Understand the concept and the aim of object-oriented programming (OOP)
  • Create an object blueprint by defining a class
  • Create an object from a defined class
  • Initialize instance attributes of a class
  • Define instance methods of a class
  • Create a child class that inherits properties from the parent class
  • Create a protected variable of a class which cannot be accessed outside the class
  • Create a private variable of a class which cannot be accessed outside, within or by a subclass
  • Create a game from scratch to summarize what have learnt in the two courses

 

Course outline

(1) Lesson 1

  • Object-oriented programming

1. Defining a class and creating an object

2. Instantiate an object: the __init__method

3. Creating class method

4. Inheritance: parent class vs child class

5. Encapsulation: protected member vs private member

 

(2) Lesson 2

  • Guided project: Building a tic-tac-toe game to play between humans or play against the computer/ Solving sudoku by backtracking algorithm

Your browser is not the latest version. If you continue to browse our website, Some pages may not function properly.

You are recommended to upgrade to a newer version or switch to a different browser. A list of the web browsers that we support can be found here