Department/ Programme: Course Code: Credit Hours: 6 hours/week
Computer Science COM 315
Subject/Course: Theoretical: 2 hours/week
PROGRAMMING IN PYTHON
Year: Semester: Pre-requisite: COM Practical: 4 hours /week
General Objectives: On completion of this course, the student should be able to:
1.0 Understand the Features of Python and Powershell Program Development Environment.
2.0 Understand and work with Python Data Types.
3.0 Understand Control Structures in Python.
4.0 Understand Functions, Libraries and Modules in Python
5.0 Understand Object Oriented Concepts in Python
6.0 Understand working with Databases in Python.
7.0 Understand the Basics Data Analysis with Python.
General Objective 1.0: Understand the Features of Python and Powershell Program Development Environment.
Week/s Specific Learning Teacher’s Resources Specific Evaluation
Outcomes activities Learning Teacher’s activities
Outcomes
1.1 Explainthe main Describe the What are the
1 features of Python. features of PC and a Assign values to numeric and string Guide students to main features
Python; It is multimedia variables and display it using the assign values to of Python
interpreted, projector. Print command. numeric and string programming
1.2 Explain the
Object variables and use the language?
functions of the Python
Oriented, Python Print command to
Powershellprogrammers
Interactive, and Interpreter display it. What is the
development
a Scripting function of
environment.
language. White Python
board. Powershell?
Explain the
difference
between an
interpreted
language and a
compiled
language.
Explain the
function of the
Python
Powershell
development
environment.
General Objective 2.0: Understand working with Python Data Types
2-3 2.1 Explain data types Explain PC and a Create variables for Integers, Floating Guide students to Explain Data
variables and multimedia point numbers, and Strings. Assigns create variables for Types and
2.2 Explain the concept outline the rules projector. values to the variables. different data types. operators.
of Variables, Strings, for creating
and Constants. variables Python Use arithmetic, assignment, logical, Demonstrate how to Describe
Interpreter and comparison operators on variables use data types, Lists and
2.3 Explain the concept Explain the and constants. operators, variables, Tuples.
of casting Data types; White and constants in
Integer, Float, board. Use the constructor functions int(), Python.
Complex, float(), and str() to specify a data type
2.4 Explain Lists and string, etc. on a variable. Guide students on
Tuples how to
Explain the Manipulate Lists and Tuples using write simple Python
concept of Len(), Append(), Insert(), Del(), program to display
2.5 Explain Operators
Casting. Clear(), functions. texual or numeric
in Python output.
. Discuss: Use the Tuple() method to create a
Arithmetic Tuple and apply the Len() and Del() Guide students to
operators functions. create and work with
Assignment Lists, Tuples, and
operators Use the Def command to create a Functions.
Comparison Function. Write a short program to
operators call the function.
Logical
operators
Identity
operators
Membership
operators
Bitwise
operators
General Objective 3.0: Understand Control Structures in Python.
3.1 Explain Describe the PC and a Write programs using IF statement, Demonstrate the How does
conditional statements use of multimedia using IF and ELIF construct, and implementation of the IF
in Python conditional projector. using IF…ELIF…ELSE construct. Conditional statement
4-5 blocks such as Statements. work?
3.2 Explain Loops in IF…ELIF and Python Write programs that use the WHILE Guide students on
Python; For Loops, ELSE Interpreter loop, WHILE with BREAK, WHILE using IF, ELIF, Explain how
While Loops with CONTINUE ELSE statements. FOR and
Explain how White Demonstrate the WHILE
FOR and board. Write programs that use the FOR implementation of loops work.
WHILE loop loop, FOR with BREAK. FOR and WHILE
constructs loops. Guide
work. students on using
WHILE, BREAK,
and CONTINUE
commands.
General Objective 4.0: Understand Functions, Libraries and Modules in Python
6-7 4.1 Explain Functions Explain PC and a Use the Def command to define a Guide students to: Explain
and differentiate Functions and multimedia function and set its parameters. Call Functions
between Library function projector. the function. Use the Def command and function
functions and User- parameters. to define a function parameters.
defined functions. Python Use the Return statement to exit a and set its parameters.
Outline the Interpreter function. Call the function.
4.2 List the rules for rules for
creating functions. creating White Create a recursive function by writing Use the Return
functions board. a programs that creates a user-defined statement to exit a
4.3Explain the need for function which calls itself. function.
recursive functions.
Explain Write programs that calls built-in Create a recursive
4.4Explain modules. Recursive functions from the Python Library function by writing a
. functions programs that creates
Write a program that is made of at a user-defined
Explain least two modules. function which calls
modules itself.
Explain how Write programs that
recursive calls built-in functions
functions work from the Python
Library
Discuss Python
Library Write a program that
functions. is made of at least two
modules.
General Objective 5.0: Understand Object Oriented Concepts in Python
5.1 Explain Object Explain Object Create a class named MyClass, with a
7-8 Oriented programming Oriented PC and a property named x
concepts: multimedia Create an object named p1, and print
5.2 Define Class and Abstraction, projector. the value of x
Object Polymorphism, Create a class named Person, use the
Inheritance, and Python init () function to assign values for
5.3 Define Methods Encapsulation. Interpreter name and age
Explain Insert a function that prints a greeting,
Methods and White and execute it on the p1 object
5.4 Define Parent and
how they relate Create a Parent Class named Person,
Child Classes board.
to Objects in a with firstname and lastname properties,
Class. and a printname method
Explain Parent
Create a class named Student, which
Class and Child
Class will inherit the properties and methods
from the Person class
General Objective 6.0: Work with Databases in Python
6.1 List the different List and explain Create a database named "mydatabase" Guide students to:
databases that Python the different PC and a using the Create Database command. Create a database
API supports Databases that multimedia Create a table named "customers" with named "mydatabase"
Python API projector. two fields “Name” and “Address” in using the Create
9-10 6.2 Explain MySQL supports. “mydatabase” using the Create Table Database command.
database commands. Python command. Create a table named
Explain Interpreter Insert a record in the "customers" table "customers" with two
database using the Insert Into command fields “Name” and
operations and White Query the “customers” using the “Address” in
the syntaxes board. Select..From..Where statement “mydatabase” using
and functions of Delete a record from “customers” the Create Table
the following using the Delete...From…Where command.
database statement Insert a record in the
command: Delete “customers” from "customers" table
Create “mydatabase” using the Drop Table using the Insert Into
Database, statement command
Create Table, Query the “customers”
Insert, Select, using the
Where, Order Select..From..Where
by, Delete, statement
Drop Table, Delete a record from
Update, Join “customers” using the
Delete...From…Where
statement
Delete “customers”
from “mydatabase”
using the Drop Table
statement
General Objective 7.0: Understand the Basics of Data Analysis with Python
7.1 Explain the concept Explain Big PC and a Create a three dimensional array using Demonstrate the Outline the
of Big Data Data and its multimedia the array command, assign data type to functions of NumPy strengths of
11- 12 characteristics: projector. the array using dtype argument, and by creating an array Python as a
7.2 Outline the Volume, check its dimension using ndim using the Array programming
strengths of Python as a Velocity, Python Method. function, assigning language for
programming language Variety, and Interpreter data type to the array Big Data
for Big Data analysis. Veracity. Create a series using the Series() using dtype argument, analysis.
Explain why White Method, print the series using a Print and check its
7.3 Explain the Python is a board. statement. dimension using
programming ndim() Method.
functions of NumPy,
language that is Create a Dataframe in Pandas using the
Pandas, and MatplotLib used for Big
libraries. Dataframe statement and print it using Demonstrate the
Data analysis. functions of Pandas by
the Print statement.
Explain the creating a series using
functions of the Series() Method,
essential print the series using a
Python libraries Print statement.
for data
Demonstrate how to
analysis such as
create a Dataframe in
NumPy,
Pandas using the
Pandas, and
Dataframe statement.
MatplotLib.
7.4 Define Dataset and Explain the Import and open a CSV file using the Demonstrate how to
explain how it differs function of Import statement and the Open () import and open CSV
13 from a Database. Datasets. function. files using the Import
statement and the
7.5 Explain the Differentiate Export CSV files using the Open () function.
commands used for between a WriteRow() function.
importing and exporting Dataset and Demonstrate how to
datasets. Give their Database. Import data into a Python dataset using export CSV.
syntaxes. the Import statement and the Insert
Explain the function.
process of
importing and
exporting
datasets.
7.6 Explain the need for Explain the Use the Fillna() and Dropna()
cleaning data in process of functions to fill missing values and
14-15 preparation for analysis. cleaning and drop missing values respectively in a
preparing data dataset.
7.7 Explain correlation for analysis.
and why it an important Calculate correlation using the Corr()
metric in data analysis. Explain method.
correlation and
Explain unstructured outline the Use the pyMongo function in Pyhton
and semi structured different types to connect to MongoDB and insert,
data. of correlation. update, and delete records using the
Insert(), Update(), and Delete methods.
Explain
unstructured
and semi
structured data
Introduce
NoSQL
databases and
explain features
of MongoDB.