Unit 1 - Lab Manual 1
# Use single line and multiline comments
# Input 2 numbers and perform all arithmetic operations.
# Input a float number and convert it to integer and show its half.
# Create a constant pi and show area of circle
# Show output accordingly
[Link]. Name Address Salary(in K)
1 Ram Thapa Btl 100.65
2 Sita Bhandari Ktm 50.55
Unit 2 - Lab Manual 2
# Input an integer and check for even/odd
# input a character and check for vowel/consonant
# Input a number and show equivalent Nepali month name using match.
# input an integer number and check for prime number.
# Show all numbers from 33 to 25 using while loop.
# Display following pattern
12
123
1234
12345
Chapter 3 - Lab Manual 3
# Create a list of 10 friend names
# Add a new friend name using append
# Add a new friend name using insert
# Remove a friend name
# Sort friend list in ascending order
# Sort friend list in descending order
# Reverse the friend list
# Slice friend list from 2 to 5
# Check for a friend name in list
# Show the index of the searched friend name
Lab Manual – 4
# Create a list of numbers
# Print the minimum and maximum value from list
# Show the sum of all list numbers
# Square all the numbers using list comprehension
Lab Manual - 5
# Perform matrix addition, subtraction and multiplication
Lab Manual - 6
# Create a tuples of numbers
# Create another tuple and concetanate
# Repeat the tuple 3 times
# slice tuple from 2 to 4 numbers
# check for 5 in tuple
# How many 5 are there in tuple?
# Change the value of 2nd number in tuple
Lab Manual - 7
# Create a dictionary of employee with at least 5 key-value pair
# Add an item in dictionary
# Remove an item from dictionary
# Change value of any one key in dictionary
# Check for a key in dictionary
# Show total number of keys in dictionary
# Show all key and value pair using loop
Lab Manual - 8
# Create a set of at least 7 items
# Insert a new item in set
# Delete an item from set
# Create another set with at least 5 items
# Perform union, intersection, difference and symmetric difference operations in above two sets
# Check for subset and superset
Lab Manual - 9
# Create a string variable with string value
# Slice the string showing even position characters only
# Create another string variable and concatenate
# Show the length of a string
# Covert to lowercase
# Covert to title case
# Swap the case of all characters
# Search for “you” in string
# Replace “i” with “m”
# Convert the string to list based on a separator “ “ (space)
# Join the list using the separator
# Check for the alphabetic
# check for numeric string.
Unit 4 – Lab Manual 10
# Create a class EMPLOYEE with attributes EMPID, ENAME, ADDRESS, GENDER, POST and SALARY. Use
constructor to initialize value and method SHOWEMP( ) to show all its value.
Lab Manual 11
# Create a class HUMAN with attributes NAME, GENDER and AGE. Create another class STUDENT with
attributes FACULTY and SEMESTER. Also, STUDENT class inherits from HUMAN class. Both classes must
have same method name DISPLAY( ) to show its value.
Lab Manual 12
# Create a class HUMAN with attributes NAME, GENDER and AGE. Create another class JOB with
attributes JOBLOCATION. Create another class EMPLOYEE which inherits from HUMAN and JOB both
with its own attributes POST and SALARY.
Unit 5 - Lab Manual 13
# Create a function with 5 parameters to show average. Use default arguments with at least 2 numbers
compulsory.
Lab Manual 14
# Create a function to show highest number passed in function with the number of parameters not
fixed.
Lab Manual 15
# Create a function to show key value pair as argument and the number of key value pair not fixed.
Lab Manual 16
# Create a file [Link] and write at least 20 characters in it.
Lab Manual 17
# Read the file [Link] and show its contents.
Lab Manual 18
# Create an list and ask for index to show the indexed number. Exception handle index error.
Lab Manual 19
# Input two numbers and show its division. Exception handle divide by zero, Type error etc. with ELSE
and FINALLY block also.
Lab Manual 20
# Create a database COLLEGE and table STUDENT and STAFF
Lab Manual 21
# Delete a table STAFF
Lab Manual 22
# Insert 5 records in STUDENT table
Lab Manual 23
# Change the ADDRESS of rollno 2
Lab Manual 24
# Show all female students information
Lab Manual 25
# Delete student from butwal and bhairahwa
Lab Manual 26
# Create a registration form user interface
Lab Manual 27
# Create a GUI with 2 input box and a button. When the button is clicked show its sum.
Lab Manual 28
# Create the home using tkinter