revision_questions-board_practical_exam[1]
revision_questions-board_practical_exam[1]
revision_questions-board_practical_exam[1]
REVISION QUESTIONS
SSCE PRACTICAL EXAMINATION (2025)
SUBJECT: COMPUTER SCIENCE (083)
Note:
1.Use input() to accept values. All programs should use functions (user defined).
2.Verify the file created/ modified on your computer for questions based on text/binary/csv files.
Question 1: Python code with comments and output – of one sample input
Question 2: Write SQL commands:
to create a database in your name; to create the table ;
to add the first row and 4 queries as mentioned in the question.
Question 1
1. Write a Python program to:
a. Accept a range of numbers and save all prime numbers within the range into a list. Save the
list on the file: PRIMES.DAT
b. Read the file and display all prime numbers below 150. If there are none, print “NO DATA”.
2. Write a Python program to input ‘n’ rows and save them in the csv file:patient.csv. A sample
is shown below.
5. Write a Python program to store ‘n’ student names (first name, last name) in the text file:
NAMES.TXT. Each line shall contain: first name,last name.
i)Accept last name from the user and display all names having the same last name or display
NOT FOUND
ii)Display all first names in alphabetical order.
6. Create a python program to write ‘n’ lines into the text file: sample.txt. Create another text
file :new.txt, by deleting the words “a”, “the”,”an”.
7. Create a binary file: event.dat, to store ‘n’ records each containing information of an event
in the form of a dictionary, as given below.
,‘name’: “event name”, “date” :”10/10/2019”, “cost”:12345-
Accept a choice and display all records whose cost is in the range 10000 and 20000, in a
tabular form.
8. Create a binary file: news.dat, store ‘n’ dictionaries (containing details of newspaper) as
given below.
9. Create a CSV file: PYTHON PROGRAM.CSV to store the data in the following format.
Class Topic SEGMENT Marks assigned
8 Sustainable development goals AI 5
9 Neural Network AI 10
10 Introduction to python PYTHON 5
11 Data Handling in python PYTHON 5
12 File handling PYTHON 15
Compute Average marks allocated to a given segment.
10.Write a python Python program to create the csv file: MARKS.CSV in the above format. Test value
must be : positive integer between -50 and 50 . Selected will have 1, if the average score is 25 or
above. Read the file and print the total number of candidates who are selected.
Marks.csv
CANDIDATE TEST1 TEST2 TEST3 TEST4 AVERAGE Selected
NAME
11. Write a Python program to accept and store: employee number, employee name , in a
list. Perform following operations by implementing a stack. Display top element.
1. Insert an element
2. Delete an element
3. Display
4. Exit
Sample stack: * *1,”Josh”+,* 2,”Rohan”++
Question 2
1. Create the tables given below, in MySql and insert values. Write queries for (i) to (iv).
TABLE: TRAINS
TABLE: PASSENGERS
(i) To display details of all Trains which Start from New Delhi.
(ii) To display the PNR, PNAME, GENDER and AGE of all Passengers whose AGE is below 35.
(iv) To display details of all Passengers travelling in Trains whose TNO is 12015.
2. Create the table given below, in MySql and insert values. Write queries for (i) to (iv):
3.Create the table given below, in MySql and insert values. Write queries for (i) to (iv):
PATIENT
4.Create the table given below, in MySql and insert values. Write queries for (i) to (iv):
TABLE: BANK
Acc_no Cname Bname Amount Dateofopen T_Transactions
1 Anirban State bank of India 17000 15/7/2019 35
2 Yatin State bank of India 38000 10/02/2019 41
3 Amit Axis bank 51000 10/02/2021 25
4 Rakshit Punjab national bank 26000 10/02/2023 10
5 Rashmi State bank of India 45000 10/02/2017 56
6 Yatin Axis bank 71000 10/02/2018 21
7 Shreya ICICI 600000 10/02/2012 51
i) Display data for those customers whose amount is less than 25000,sorted by their
dateofopen.
ii) List the minimum,maximum amount from the bank.
iii) Display all unique bank names.
iv) Display total number of transactions for each bank if the number is more than 70.
5. Create the table given below, in MySql and insert values. Write queries for (i) to (iv):
PRODUCT
P_ID PRODUCTNAME MANUFACTURER PRICE
P001 MOISTURISER DOVE 40
P002 SANITIZER DETTOL 25
P003 BATH SOAP LUX 35
P004 DETTOL LIQUID DETTOL 75
P005 LIQUID DETERGENT SURF 250
P006 CLEANING BRUSH EXO 180
P007 TOOTH BRUSH COLGATE 40
a) Delete all rows whose manufacturer is LAC.
b) Display all records in ascending order of price.
c) Display number of products of each manufacturer.
d) Display product and manufacturer in alphabetical order of product.
6. Create the table given below, in MySql and insert values. Write queries for (i) to (iv):
Table:Zoo
7. Create the table given below, in MySql and insert values. Write queries for (i) to (iv):
Table : CLUB
8. Create the table given below, in MySql and insert values. Write queries for (i) to (iv):
Teacher