0% found this document useful (0 votes)
102 views5 pages

G12 Practical File 2024-25

Grade 12 computer science practical
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)
102 views5 pages

G12 Practical File 2024-25

Grade 12 computer science practical
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/ 5

ABUDHABI INDIAN SCHOOL – BRANCH 1, AL WATHBA

Computer Science Practical File Questions (2024-2025)

1. Create a menu driven program to calculate the area of the following shapes based on user’s choice:
1. RECTANGLE
2. SQUARE
3. TRIANGLE
4. PARALLELOGRAM
5. CIRCLE
2. Create Number Guessing Game in Python using random module.
3. Write a Python program to accept a string from the user and create a menu to :-
a. Check whether it is palindrome or not.
b. Display number of characters,
c. No of words,
d. No.of lower case letters,
e. No. Of uppercase letters
f. No. of digits in the string.
4. Create a Python program to accept a list of numbers from the user then display the highest number and
lowest number. Also display the reverse of the list.
5. Write a menu driven program to input names of n students, total marks, average and result and store in a
nested tuple. Display the following menu:
a. Result: Display name, marks, average and assign result as “pass” if average is more than 32 and
“fail” if less than 33.
b. Display: Display name, total marks and average of all students.
c. Search: Accept name and display other details if found and display not found if doesn’t exist.
d. Merit list: Display students getting average marks above 74.
6. Write a menu driven program to accept and store Employee name as key and his salary, allowance and
deductions as value in a dictionary for 10 employees. Display the following:
a. Display the total salary.
b. Display total allowance and deductions.
c. Search an employee
7. Write a Python program to create a list for storing the first 12 terms of Fibonacci series.
8. Create a Python program to have the following functions:
a. A function that takes a number as an argument and calculates its cube. If there is no value passed to
the function, it should calculate the cube of 5.
b. A function that receives two strings and checks whether they are the same length string or not. It
should return True if both are the same length string otherwise False
9. Write a program to create a text file “Story.txt” and do the following:-
a. Display the number of blanks present in the file.
b. Display the number of lines present in the file.
c. Display the number of capital letters present in the file.
d. Display the number of words present in the file.
e. Display the number of lowercase letters present in the file.
10. Write a program to read the text file “Poem.txt” and display it content after replacing every space by #
11. Create a text file “My School.TXT” with some information regarding your school. Read the content of the file
“My School.TXT” and display the following:
a. No of characters in the file.
b. Number of vowels present in the file.
c. Number of consonants present in the file.
d. Number of words start with “A”
12. Write an interactive menu driven program to perform the following operations on a data file “customer.dat”
which stores the information such as Customer_Id, Cust_Name, and Cust_City as a list.

1. Insert a record

2. Search record for a given Customer_ID

3. Update record using a particular Customer_ID

4. Display records.

13. Create a binary file “Student.dat” has structure [admission_number, Name, Percentage]. Write a function
that would read contents of the file student.dat and display the details of those students whose percentage
is above 75 in new file named “percentage.dat”.

14. Create a CSV file called “contact.csv” to store name and contact number of any 10 students. Write a function
to display the content of the file.

15. Create a CSV file “books.csv” to store BOOKID, BOOKNAME, AUTHOR and PRICE as a tabular form: Write it as
a menu driven program to do the following:-

1. Write new row

2. Read all rows

3. Search a book information based on given bookid.

16. Create a menu driven program to do the following stack (EMP )operations:-
EMP[EMPID,ENAME]
1. Push
2. Pop
3. Display
4. Exit
17. Create a menu driven database connectivity program to do the following transaction on a MySQL table EMP
(EMPNO,ENAME,JOB,SALARY,DOB,ADDRESS,DEPTNO).
1.Create
2.Insert
3.Display
4.Exit
18. Create a menu driven database connectivity program to do the following transaction on a MySQL table
TEACHER (TID,TNAME,DESIGNATION,SALARY,DATEOFJOINING,PHONENUMBER,ADDRESS).
1.Create
2.Insert
3.Delete
4.Exit,
19. Create a menu driven database connectivity program to do the following transaction on a MySQL table
BANK(ACC_No, Name, Acc_Balance, Mobileno, Email)
1.Create
2.Insert
3.Update
4.Exit
20. Create a menu driven database connectivity program to do the following transaction on a MySQL table MOV
(MOVNO,TITLE,TYPE,RATING,STARS,QTY,PRICE).
1.Create
2.Insert
3.Search
4.Exit

21.SQL Program
Refer the following tables and answer the following questions:-

Column Name Data Type Size Constraint


Admn No Integer Primary Key

Name Char 20 Not Null

Age Integer 2

Department Char 35 Not Null

DOJ Date

Gender Char 1

Admn Name Age Department DOJ Gender


No
100 Arpit 18 Computer 10/01/2017 M

105 Arun 19 History 24/03/2015 M

110 Ankita 17 Hindi 12/12/2016 F

112 Shilpa 20 Computer 01/07/2014 F

120 Sanjay 19 Maths 25/02/2017 M

135 Neelam 21 Hindi 31/07/2016 F


Q1. Create the table Student

Q2. Insert the above records in the table student

Q3. Display all information about students of ‘Computer’ department.

Q4. Display the names of female students who are in Hindi department.

Q5. Display the names of all students with their date of joining in ascending order.

Q6. Display Admnno, Name and Age of male students only

Q7. Count number of students who are above 19 years of age.

Q8. Insert a new row in the table with the following data.

Admn No : 145, Name : John, Age: 19, Department : Computer, DOJ: 2016-09-20, Gender:Male
Q9. Display the number of distinct departments.

Q10.Display the number of students in each department.

Q11. Display the student details whose name start with ‘A’

Q12. Display the details of female students joined after 2016.

22. SQL PROGRAM


Refer the following tables and answer the following questions:-
Table: Employee

EmpNo Name Salary Zone Age Grade Dept


1 Kishore 30000 West 28 A 10

2 Kritika 35000 Centre 30 A 10

3 Naveen 32000 West 40 20

4 Uday 38000 North 38 C 30

5 Nupur 32000 East 26 20

6 Moksh 37000 South 28 B 10

7 Shelly 36000 North 26 A 30

Table: Department
Dept Dname Minsal Maxsal HOD
10 Sales 25000 32000 1

20 Finance 30000 5000 5

30 Admin 25000 40000 7

1. Create the table Employee


2. Create the table Department
3. Display the records of Employee table
4. Display the records of Department table
5. Display the records of all employees with their annual salaries. Annual salary is calculated as salary*12.
6. Display the names of all employees working in North zone.
7. Display the details of all employees whose grade is NULL
8. Display the names of various zones from the table Employee. A zone name should appear only once.
9. Display the details of all employees who are getting a salary of more than 35000 in the department 30.
10. Display the names and salaries of all the employees who are not working in department 20.
11. Display the names and salaries of all the employees who are working neither in West zone nor in Centre
zone.
12. Display the names of all the employees who are working in department 20 or 30.(use IN operator)
13. Display the details of all employees whose grade is between A and C.
14. Display the name, salary and age of all the employees whose names contain ‘a’.
15. Display the sum and average of the salaries of all the employees.
16. Display the highest, lowest and average salary of each zone.
17. Put grade ‘B’ for all those whose grade is NULL.
18. Increase the salary of all employees above 30 years of age by 10%.
19. Delete the records of all the employees whose grade is C and salary is below 30000.
20. Add another column hiredate of type date in the Employee table.
21. Display the details of all employees who work in Sales department.
22. Display the name and department name of all the employees.
23. Display the names of the department and the name of the corresponding HOD for all the departments.
24. Display the name, salary and zone of all the employee’s department wise in descending order.
25. Display the departments where the total number of employees is greater than 2.

You might also like