HCSCI 132 Course Outline 2022
HCSCI 132 Course Outline 2022
PREAMBLE
The course aims to introduce the basic principles of programming, programming paradigms,
program constructs, data structures and implementation of algorithms using Python
programming language. Modular programming through use of functions and modules will
also be covered to enhance students understanding of code reusability. Moreover data
persistence will be demonstrated in files and databases. The course will equip students with
knowledge on basics of Object Oriented Programming (OOP) using classes and objects.
Lastly, students will get to explore fundamentals of object-based programming using the
Tkinter library in Python.
OBJECTIVES
1
● Apply data persistence using file IO while handling exceptions.
● Create simple console and GUI-based database application.
● To test and debug applications developed in Python.
● Create simple user interfaces (UI) in Python using Tkinter library.
COURSE CONTENT
2
o Built-in and user-defined functions
o Passing by Ref and Value
o Arguments
o Lambda Functions
o Namespaces and Scoping
● Modules
o Definition
o Import Statement
o Using built-in modules e.g. math, string, sys and
time
o Using user-defined modules
o Locating modules
7-8 UNIT IV – Classes
● Classes
● Class Definition
● Constructor & Instance Object Creation
● Class and Instance Methods
● Accessing Attributes
● Built-In Class Attributes
● Inheritance & Polymorphism
9-10 UNIT V – File IO and Exception Handling
Submission Practical
● File IO
Assignment 2
o Opening and Closing a File
o Write and Read Functions
Test 2
o with Statements
● Exception Handling
o Standard Exceptions
o Assertions
o Try....except...else blocks
o Except Clause with No Exceptions
o Except Clause with Multiple Exceptions
o The try-finally Clause
Submission Practical
10-11 UNIT VI –Databases and GUI
Assignment 3
● Databases
o SQL queries
Submit Mini Group
o SQLite
Project
o Creating an SQLite database connection
o Mini console application working with
Quiz Assignment
databases
● GUI
o Working with Tkinter library
3
o Creating objects using Tkinter library
o Mini GUI application working with databases
Methodologies:
Lectures, Lab sessions, Group Work, Presentations, Research, Discussions and Tutorials
Tools to be used:
Python 3.8+ Interpreter
Python Text Editor (e.g. Notepad++) and IDE (Python 3.8+ or Anaconda 3.5+)
Google Colab
Course Assessment:
Final examination: 60%
Practical work 25%
● 3 Lab Assignments (5%, 7.5% and 7.5%)
● Group Mini Project (5%)
Course work: 15%
● 2 Tests (5% and 5%)
● 1 Quiz Assignment (5%)
Course Material:
i. Tim Hall and J-P Stacey, (2009). Python 3 for Absolute Beginners. Apress.
ii. Zed A. Shaw, (2014). Learn Python the Hard Way: A Very Simple Introduction to
the Terrifyingly Beautiful World of Computers and Code. Addison-Wesley, USA.
iii. Bob Dowling. An introduction to Python for absolute beginners. University
Information Services, University of Cambridge. [Available on:
http://www.ucs.cam.ac.uk/docs/course-notes/unix-courses/PythonAB accessed 07
February 2018]
iv. Code Jackson, (2011) Learning to Program Using Python. Creative Commons,
California: USA.
v. Magnus Lie Hetland, (2005). [E-book] Beginning Python From Novice to
Professional. Apress
vi. Tutorialspoint.com. [Online: https://www.tutorialspoint.com/python3 Accessed 01
February 2020].
vii. Pythonprogramming.com. [Online: https://pythonprogramming.net/beginner-
python-programming-tutorials/ Accessed 01 February 2020].
viii. W3Schools.com. https://www.w3schools.com/python/ Accessed 01 February
2020].