NAME: VEER PRATAP SINGH
CLASS: XII A
ROLL NO: 46
Board Roll No.: 14737840
SCHOOL: Kendriya Vidyalaya Sector 5 Dwarka
PROGRAM 1
Write a menu driven program in python to display 4 Fibonacci series of a given no and print factorial of a given no using
functions.
OUTPUT:
PROGRAM 2
Write a menu driven code in python to check whether string entered by user is palindrome or not and number entered by
user is prime or not (using functions).
OUTPUT:
PROGRAM 3
Write a program to create dictionary that stores names and phone numbers. And to search phone number by using name
entered by user.
OUTPUT:
PROGRAM 4
Write a program to read a list of n integers(positive as well as negative). Create two new lists, one having all positive
numbers and zero and other list contains all negative numbers.
OUTPUT:
PROGRAM 5
Write a program to generate random numbers between 1 to 6 and check whether a user won a lottery or not.
OUTPUT:
PROGRAM 6
Write a program to count the number of vowels present in a text file(story.txt)
Output:
PROGRAM 7
Program to read the content of file line by line(test.txt) and write it to another File (poem.txt) except for the lines
containing letter 'a' in them.
Output:
PROGRAM 8
Program to read and display file content line by line with each word separated by '#' .
PROGRAM 9
Write a program to create binary file to store n values of Rollno and Name in the form of list , and also Search any Rollno
and display name if Rollno found otherwise “Rollno notfound”.
Output
PROGRAM 10
Write a Program to create binary file to store Rollno,Name and Marks and update marks of entered Rollno.
Output
PROGRAM 11
Program to create csv file and store empno, name , salary and count number of records in a file
Output
PROGRAM 12
Write a program to save some user id and passwords in a csv file. Ask user to enter a user id and password, if combination
matches it should print ‘welcome’ other wise print ‘data mismatch’.
Output
PROGRAM 13
Write a menu driven program implementing user defined functions to perform functions on a csv file “student” such as
i. Write a single record to csv
ii Write all records in one single go to csv file.
iii, _ Display all the contents of csv file.
Output
PROGRAM 14
Write a menu driven program to implement stack for book details [bno,bname] to PUSH,POP and
DISPLAY elements on stack BOOK.
Output
PROGRAM 15
Write a menu based program to perform PUSH, POP and DISPLAY operation on stack in python using
Dictionary. score={'anuj':40,'sachin':55, 'saurav':80,'raj':35,'ajay':42}
Output
PROGRAM 16
Program to connect with database company and store record of employee containing employee
number,name,department and salary and display records.
PROGRAM 17
Program to connect with database and search employee number in table employee and display record,
if empno not found display appropriate message.
PROGRAM 18
Program to connect with database andincrease the salary of employee by 10% of employee whose
empno. is entered by user.
PROGRAM 19
Program to connect with database and delete the record of employee whose empno. is entered by user.