0% found this document useful (0 votes)
17 views25 pages

Cs Prac (2) 222

The document outlines a series of programming assignments for a class XII student, Veer Pratap Singh, at Kendriya Vidyalaya Sector 5 Dwarka. Each program focuses on different functionalities in Python, including Fibonacci series, palindrome checking, dictionary usage, file handling, and database operations. The assignments emphasize the application of functions and data structures in Python programming.

Uploaded by

veerpraisesingh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views25 pages

Cs Prac (2) 222

The document outlines a series of programming assignments for a class XII student, Veer Pratap Singh, at Kendriya Vidyalaya Sector 5 Dwarka. Each program focuses on different functionalities in Python, including Fibonacci series, palindrome checking, dictionary usage, file handling, and database operations. The assignments emphasize the application of functions and data structures in Python programming.

Uploaded by

veerpraisesingh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

NAME: Veer Pratap Singh

CLASS: XII A
ROLL NO: 03
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)
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.
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”.
PROGRAM 10
Write a Program to create binary file to store Rollno,Name and Marks and update marks of entered Rollno.
PROGRAM 11
Write a Program to create binary file to store Rollno,Name and Marks and update marks of entered Rollno.
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’.
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.


PROGRAM
14
Write a menu driven program to implement stack for book details [bno,bname] to PUSH,POP and
DISPLAY elements on stack BOOK.
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}
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
by user. empno. is entered
PROGRAM 19
Program to connect with database and delete the record of employee whose empno. is
entered by user.

You might also like