Workshop: Introduction to Python programming for non-programmer I (Evening)
Workshop/ Training/ Webinar
-
Date
07 - 14 Sep 2022
-
Organiser
ITS
-
Time
18:00 - 20:30
-
Venue
Online (MS Teams)
Enquiry
IT HelpCentre (Hotline) 2766 5900 / (WhatsApp/ WeChat) 6577 9669
Summary
Introduction to Python programming for non-programmer I (2 lessons)
Date: 7 Sep and 14 Sep
Time: 18:00 - 20:30
Target Audience: All Students
Medium of Instruction: English
Pre-requisite: Nil
What you will learn
- Understand the history and advantages of Python language
- Use Python Shell to write and execute Python codes
- Open and edit Python codes in IDLE editor
- Customize the IDLE working environment
- Work with Python variable such as assigning values and casting data type
- Know the common data types in Python
- Use operators to get numerical or logical values from variables
- Define a Python function to run repetitive process
- Define a function with different formats of input arguemnts
- Control the logical flow of a Python program using if, else and elif
- Loop over a segment of codes with a control variable using for and while
Course outline
Lesson 1
- Introduction
- History of programming and Python
- Reasons of using Python
- Getting start with Python
- Using Python in interpreter/shell
- Execution and exiting
- Running Python script in the command line
- IDLE (Integrated Development and Learning Environment)
- Using IDLE shell
- Working with Python file
- Debugging
- Customizing fonts/tabs, highlights and keys
- Using Python in interpreter/shell
- Variables
- Creating variables
- Casting
- Data Types and Operators
- Text, numeric, sequence, mapping, set, Boolean
- Operations on values and variables
- Arithmetic operators
- Assignment operators
- Comparison operators
- Logical operators
- Identity operators
Lesson 2
- Function
- Defining and calling a function
- Arguments
- Default argument
- Keyword argument
- Variable-length argument: non-keyword vs keyword
- Docstring
- Writing and retrieving docstring
- Control flow
- If-else
- A simple if-else statement
- Short-hand form of If and if-else
- Elif
- Combining conditional statements
- Loops
- While loop
- Break and continue
- Else
- For loop
- Iterating over different iterators
- Break and continue
- Nested loops
- While loop
- If-else