0% found this document useful (0 votes)
10 views4 pages

Computer Science Practical Exam 2023

The document outlines the practical examination for Computer Science (083) for the All India Senior School Certificate Examination 2023-24, including a menu-driven program for managing telephone records and SQL queries for trainer data. It specifies tasks such as adding, displaying, and searching records in a CSV file, as well as SQL queries to filter trainer information based on various criteria. The examination consists of multiple sections, including practical report, project, and viva voce.
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)
10 views4 pages

Computer Science Practical Exam 2023

The document outlines the practical examination for Computer Science (083) for the All India Senior School Certificate Examination 2023-24, including a menu-driven program for managing telephone records and SQL queries for trainer data. It specifies tasks such as adding, displaying, and searching records in a CSV file, as well as SQL queries to filter trainer information based on various criteria. The examination consists of multiple sections, including practical report, project, and viva voce.
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

All India Senior School Certificate Examination 2023-24

Practical Examination - Computer Science (083)


SET 4
Time: 3:00 Hours Max. Marks: 30
Q 1. a) Write a menu drive program to perform the following operations into [Link].
1. Add record.
2. Display records
3. Search record
4. Exit
The structure of file content is: [s_id, name, brand, type, price]
b) Consider the table given below and write the sql queries based on the table data 4
Table Name : Trainer

a. Display the details of the trainer who joined before june 2001 and after dec2001
b. Display the name and salary of the trainer who belongs to Mumbai and Delhi
c. Increase the salary by 5% for the trainers who’s name ends with A and from Mumbai
d. To display total number of trainers whose salary is more than 75000.

Q2. Practical Report File 7


Q3. Project 8
Q4. Viva Voce 3
Solution:
import csv
def add_record():
f1=open("[Link]",'r')
ro=[Link](f1)
l=list(ro)
f=open("[Link]",'a',newline='')
wo=[Link](f)
if len(l)==0:
[Link](['Subscriber ID','name','brand','customer type','Price'])
else:
s_id=int(input("Enter Subscriber ID:"))
name=input("Enter name of subscriber:")
brand=input("Enter brand of telephone:")
typ=input("Enter customer type:")
price=float(input("Enter Price:"))
[Link]([s_id,name,brand,typ,price])
print("Record addedd Successfully.")
[Link]()

def display_record():
f=open("[Link]",'r')
ro=[Link](f)
l=list(ro)
for i in range(1,len(l)):
print(l[i])
[Link]()

def search_record():
f=open("[Link]","r")
ro=[Link](f)
sid=input("Enter id to search:")
found=0
for i in ro:
if sid==i[0]:
found=1
print("Record Found:")
print(i)
if found==0:
print("Record not found...")
[Link]()

def menu():
while True:
print('''
1. Add record
2. Display record
3. Search record
4. Exit
''')
ch=int(input("Enter your choice:"))
if ch==1:
add_record()
elif ch==2:
display_record()
elif ch==3:
search_record()
elif ch==4:
print("Over and exit!!")
break
else:
print("Invalid Choice")
menu()
SQL

a. Display the details of the trainer who joined before june 2001 and after dec2001

b. Display the name and salary of the trainer who belongs to Mumbai and Delhi

c. Increase the salary by 5% for the trainers who’s name ends with A and from Mumbai

d. To display total number of trainers whose salary is more than 75000.

You might also like