Lab report 6
Fall 2021
CSE422L Data Analytics Lab
Submitted by: Ayaz Mehmood
Registration No.:18PWCSE1652
Section: A
“On my honor, as student of University of Engineering and Technology, I have
neither given nor received unauthorized assistance on this academic work.”
Student Signature: ______________
Submitted to:
Engr. Mian Ibad Ali Shah
Last date of Submission:
11 February 2022
Department of Computer Systems Engineering
University of Engineering and Technology, Peshawar
OBJECTIVE:
The basic Objective of this lab is:
To know python basics
To learn and code different task in python
TASKS
Task 1:
1) Using function, find all the multiplicative factors of a number provided as input.
Code + Output:
Task 2:
Create a library system for DCSE using dictionaries (must include Student's information,
Books information
Code+Outputs:
List of Books and Semester Student Dictionary:
Student Registration in Library function:
Student Registration cancel in Library function:
For that we need to check whether the student really exist or not that’s why another function is
been called from inside which is checkregister function
Borrowing a book from library function:
The details of book will be saved in borrowed book list variable for every semester student. We
have defined it for every individual student.
Returning a book to library:
After returning it to library the book will be deleted from the list of borrowed list.
Home Screen Code:
Registering myself:
Borrowing a book from library:
Checking:
Registration done and DA book is been added in the borrowed list too:
Returning a book:
Checking:
Deregister from Library:
Checking:
Empty list because I have deregistered my self
Task 3:
Using functions, create an ATM system.
Code:
Output:
Successful Transaction:
Insufficient balance:
Wrong Pin:
Deposit money:
Task 4:
Design a calculator (+,-,*,/,pow) using functions
Code + Output:
All the functions definition:
Addition of two no:
Subtraction of two no:
Multiplication of two no:
Division of two no:
Power of two no: