class 12 practical paper2023
class 12 practical paper2023
1. Write a menu driven python program to implement stack operations (PUSH AND POP) 3
(A) Write a function in Python PUSH(Arr), where Arr is a list of numbers. From this list push all numbers divisible
by 5 into a stack implemented by using a list. Display the stack if it has at least one element, otherwise display
appropriate error message.
OR
(B) Write a function in Python POP(Arr), where Arr is a stack implemented by a list of numbers. The function
returns the value deleted from the stack.
2. (A) A binary file “Book.dat” has structure [BookNo, Book_Name, Author, Price]. 4
i. Write a user defined function CreateFile() to input data for a record and add to Book.dat .
ii. Write a function CountRec(Author) in Python which accepts the Author name as parameter and count and
return number of books by the given Author are stored in the binary file “Book.dat”
OR
(B) A binary file “STUDENT.DAT” has structure (admission_number, Name, Percentage). Write a function
countrec () in Python that would read contents of the file “STUDENT.DAT” and display the details of those
students whose percentage is above 75. Also display number of students scoring above 75%
3. (A) Write the outputs of the SQL queries (i) to (iii) based on the relations Teacher and Posting given below: 5
4. Practical File 7
5. Project Work 8
6. Viva – Voce 3