Course Outline
Course Outline
HCS101/HCC101/HAI101//HAST/HFM/HDSC/HIPH/HMPH Programming
Fundamentals
The course is a foundation to programming where you are going to learn fundamental
programming concepts using the Python programming language, a high-level
interpreted language that is easy to read write, with powerful libraries that provide
additional functionality.
Course Introduction
1
Demonstrate knowledge of basic concepts, syntax and control structures in
programming.
Devise suitable algorithmic solutions to simple computing problems under specific
requirements.
Encode the devised solutions into programs, debug, and test them on a computer.
Demonstrate understanding of standard coding conventions and ethical
considerations in programming.
Develop maintainable and reusable software solutions using the object-oriented
programming paradigm.
Understand how to read/write to files using python.
write Python programs within an Integrated Development Environment (IDE);
write programs that import libraries for a variety of applications, such as
random numbers and data visualization;
write interactive programs that ask for and use input from the user;
write programs that use functions and methods;
handle errors and exceptions in Python programs by using try, except,
and finally statements; and
use object-oriented programming and object methods to write code that is easy
to read and maintain.
Throughout this course, you will also see learning outcomes in each unit. You can use
those learning outcomes to help organize your studies and gauge your progress.
This course will be presented blended learning. Every week, there will be an
online quiz and practical labs that must be submitted. The student is expected to
apply learn by doing through practically writing programs. Copied source codes
from websites will be treated as plagiarism. The student is not expected to copy
and paste code but rather to write code on their own. A case study programming
assignment will be given that incorporates all learning outcomes and is expected to
be done in groups
2
This unit introduces basics of programming fundamentals. History of computers, binary
systems, different types of programming languages, compilation processes, Assembly
language, machine language, High level language, Python History, Program structure,
History and Importance of Programming, Install Python into a Machine, how to run
python file in terminal. Introduction to the IDLE interpreter (shell) and its
documentation. The software development processes. The Conceptual Model:
Flowcharts and Pseudo Code, Reasons for Python as the learner’s first programming
language. Expression evaluation: similarities and differences compared to a
calculator; expressions and operators of types int, float, Boolean. Input/output with
print and input functions. Demonstrate Visual logic for flow charts translate Visual
logic to Python, Variables, Operations arithmetic, Operators and Comments, Variable
and Assignment Operator, Integer and Float, Boolean, Comparison and Logical
Operators, String Methods, Type Conversion
Completing this unit should take you approximately 4 hours.
Unit 2: Operators
This unit introduces Python operators. Using the variable types introduced in Unit 1,
this unit will allow us to begin computing using arithmetic, relational, and logical
operators. We will also introduce operator precedence and discuss what happens when
several operators are applied within a single instruction
If you have mastered the previous units, you now have the ability to put together a
series of sequential Python instructions capable of performing some basic calculations.
You also have the ability to format those results and output them to the screen. This
unit covers "program flow control", which is necessary for programs to make decisions
based upon a set of logical conditions. Your knowledge of relational and logical
operators will be pivotal for applying a new set of Python commands that will enable
you to control your program's flow. We will also introduce the "input" command so that
the keyboard can be used to input data into a program.
Most of the programming concepts presented so far can be found in any programming
language. Constructs such as variable definitions, operators, basic input and output,
and control flow via conditional statements and loops are fundamental to what it
means to compute. In this unit, we begin studying how data is structured within
Python so we can program efficiently. Specifically, you will be introduced to lists and
also immersed more deeply in the subject of strings. Upcoming units will introduce
even more powerful data structures.
3
Unit 5: Functions
Python's power lies not only in the vast set of modules and libraries available (such as
matplotlib, random, math, numpy, etc.), but also in the data structures that are
fundamental to the language. This unit introduces three more ways of structuring data
that must be mastered: tuples, sets, and dictionaries. We will also revisit the concepts
of mutability and immutability, as we saw for lists and strings.
It is all well and good that data can be created within a program via variable
assignments and user input. However, we must also be able to deal with data stored in
files. In this unit, we will introduce methods for reading data from and writing data to
a file. At its heart, Python is an object-oriented language. Pay attention to the syntax
we use here, which will prepare you for the rest of the course.
At this point in the course, you should have some familiarity with applying string
methods for finding a pattern within a string. Regular expressions are a syntax
framework for performing more general pattern searches that allow for a measure of
pattern variability. The subject of regular expressions is actually quite deep and highly
relevant to the theory of computation. This unit will introduce you to the re module
and its regular expression syntax to gain expertise with string pattern searches.
Any programmer should be able to identify the source of potential errors and
implement code to handle those errors. This unit introduces the syntax necessary for
4
achieving this goal. Handling errors can be a sensitive topic because the programmer
must address points where something could go wrong. Devote yourself to these
examples, as they will be important in your journey to becoming a professional
programmer.
Course Materials
The primary learning materials for this course are articles, lectures, and videos.
All course materials are free to access and can be found in each unit of the course.
Pay close attention to the notes that accompany these course materials, as they will
tell you what to focus on in each resource, and will help you to understand how the
learning materials fit into the course as a whole.
There is no prescribed textbook for this course. However, the following are
recommended for those interested:
Think Python, How to Think Like a Computer Scientist, version 1.1.24+Kart [Python
3.2] by Allen B. Downey. The book is available in an online interactive format at
http
5
Allen B. Downey, Think Python: How to Think Like a Computer Scientist (2nd
Edition), O’Reilly, 2015.
Other resources
You are encouraged to make heavy use of a programmer’s best friends — Google
and StackOverflow. For Python, some useful online resources are
www.learnpython.org and www.w3schools.com/python/, while the official
documentation can be found here: docs.python.org/3/ other youtube videos eg
https://www.youtube.com/c/CleverProgrammer/videos
Course Evaluation
They will be assignment on nearly each unit which consists of both theory and
practical assignments. The coursework is 50% while the final exam is 50%.
Programming is an art therefore you can only learn by practising. Therefore have the
passion of doing things and exploring new adventures.