0% found this document useful (0 votes)
14 views2 pages

Bps 12 Sci Program List 2023-24-1

The document outlines a series of Python programming exercises categorized into different sections, including Python revision, functions, file handling, SQL statements, Python-SQL interface, and stack implementation. Each section contains specific tasks such as calculating student grades, generating Fibonacci series, reading files, and performing SQL operations. The exercises aim to enhance programming skills through practical applications and problem-solving.

Uploaded by

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

Bps 12 Sci Program List 2023-24-1

The document outlines a series of Python programming exercises categorized into different sections, including Python revision, functions, file handling, SQL statements, Python-SQL interface, and stack implementation. Each section contains specific tasks such as calculating student grades, generating Fibonacci series, reading files, and performing SQL operations. The exercises aim to enhance programming skills through practical applications and problem-solving.

Uploaded by

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

INDEX

S. No. PROGRAMS DATE SIGN.

PROGRAMS OF PYTHON REVISION TOUR

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 >=75 B
< 75 and >=60 C
< 60 D

2. Write Python program to calculate factorial of a number using while


loop.
3. Write Python program to find the maximum, minimum and mean
value from the inputted list.
4. Write Python program to generate Fibonacci series.
5. Write Python program to store students’ information like admission
number, roll number, name and marks in a dictionary, and display
information on the basis of admission number.
6. Write Python program to sort a list alphabetically in a dictionary.
7. Write Python program to count number of items in a dictionary value
that is a list.

PROGRAMS OF FUNCTIONS
8. Write Python program to input a string and pass to the function that
counts the number of uppercase and lowercase letters.
9. Write Python program to pass string to a function and count how many
vowels are there in the string.
10. Write Python program to pass string to a function and count how many
times any character is present in the string.
11. Write Python program to pass list to a function to double the odd
values and half the even values.

PROGRAMS OF FILE HANDLING


12. Write Python program to read the content from a text file “Diary.txt”
line by line and display the same on the screen.
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’.
14. Write Python program to read a text file line by line and display each
word separated by a #.
15. Write Python program to read a text file and display the number of
vowels/ consonants/ uppercase/ lowercase characters in the file.
16. Write Python program to remove all the lines that contain the character
'a' in a file and write it to another file
S. No. PROGRAMS DATE SIGN.
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.
18. Create a binary file with roll number, name and marks. Input a roll
number and update the marks.
19. Write a random number generator that generates random numbers
between 1 and 6 (simulates a dice).
20. Create a CSV file by entering user-id and password, read and search
the password for given user id.

SQL STATEMENTS
21. SQL commands Exercise-1

22. SQL commands Exercise-2


23. SQL commands Exercise-3

24. SQL commands Exercise-4

PYTHON-SQL INTERFACE
25. Write a program to insert details of an employee into a table named
EMP which include the following details :
[Empno,Empname,dept_id,designation,Salary,city]
(Empno is Primary key)
26. Write a program to search and display records of table named EMP on
basis of Empno.
27. Write a program to delete records from table named EMP.

28. Write a program to update the Salary of an employee if present in


already existing table EMP, if not display the appropriate message.

STACK IMPLEMENTATION
29. Write a program for implementation of stack operations using list.
(Menu based)
30. A list contains 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 the stack.

You might also like