INDEX
PROGRAM 1
Write Python program to calculate the result (Total and
Percentage) of student and display result and grade according to
given criteria:
Percentage Grade
>= 90 A
< 90 and B
>=75
< 75 and >= C
60
< 60 D
Program 2
Write a Python program to calculate factorial of a number using
while loop.
Program 3
Write a Python program to find the maximum, minimum and mean
value from the inputted list.
Program 4
Write Python program to generate Fibonacci Series.
Program 5
Write Python program to store students’ information like
admission number, roll number and marks in a dictionary, and
display information based on admission number.
Program 6
Write Python program to sort a list alphabetically in a dictionary.
Program 7
Write a Python program to count number of items in a dictionary
value that is a list.
Program 8
Write a Python program to input a string and pass to the function
that counts the number of uppercase and lowercase letters.
Program 9
Write a Python program to pass string to a function and count how
many vowels are there in the string.
Program 10
Write python program string to a function and count how many
times any character is present in the string.
Program 11
Write Python program to pass list to a function to double the odd
values and half the even values.
Program 12
Write Python program to read the content from a text file
“Diary.txt” line by line and display the same on the screen.
Program 13
Write Python program to read the content from a text file
“Poem.txt” and display those lines which are starting with “F” or
“D.”
Program 14
Write Python program to read a text file line by line and display
each word separated by a “#.”
Program 15
Write program to read a text file and display the number of
vowels/ consonants/ uppercase/ lowercase characters in the file.
Program 15
Write Python program to remove all the lines that contain the
character ‘a’ in a file and write it to another file.
Program 17
Create a binary file with name and roll number. Search for a given
roll number and display the name, if not found display appropriate
message.
Program 18
Create a binary file with roll number, name, and marks. Input a roll
number and update the marks.
Program 19
Write a random number generator that generates random numbers
between 1 and 6 (simulates a dice).
Program 20
Create a CSV file by entering user-id and password, read and search
the password for given user id.
Program 21
Program 22
Program 23
Program 24
Program 25
Write a program to insert details of an employee into a table
named EMP which includes the following details:
[EmpNo, EmpName, Dept_ID, Designation, Salary, City]
(EmpNo is primary key)
Program 26
Write a program to search and display records of the table named
EMP based on EmpNo.
Program 27
Write a program to delete records from table named EMP.
Program 28
Write a program to update the Salary of an Employee if present in
already existing table EMP, if not display the appropriate message.
Program 29
Write a program for implementation of stack operations using list.
(Menu based)
Program 30
A list contains the following record of course details for a
university:
[Course_Name, Fees, Duration]
Write the following user defined functions to perform given
operations on the stack named ‘Univ’:
a) Push_element(): To push an object containing the
Course_Name, Fees and Duration of a course, which has fees
greater than 100000 to the stack.
b) Pop_element(): To pop the object from the stack and display
it. Also, display “Underflow” when there is no element in
stack.