G12 Practical File 2024-25.docx
Document Details
Uploaded by DynamicFlute5612
Abu Dhabi Indian School
2024
ABUDHABI INDIAN SCHOOL
Tags
Related
Full Transcript
**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. 2. 3. 4. 5. 2. Create Number Guessing Game in Python using random modul...
**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. 2. 3. 4. 5. 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: g. Result: Display name, marks, average and assign result as "pass" if average is more than 32 and "fail" if less than 33. h. Display: Display name, total marks and average of all students. i. Search: Accept name and display other details if found and display not found if doesn't exist. j. 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: k. Display the total salary. l. Display total allowance and deductions. m. 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: n. 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. o. 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:- p. Display the number of blanks present in the file. q. Display the number of lines present in the file. r. Display the number of capital letters present in the file. s. Display the number of words present in the file. t. 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: u. No of characters in the file. v. Number of vowels present in the file. w. Number of consonants present in the file. x. 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. 16. Create a menu driven program to do the following stack (EMP )operations:- EMP\[EMPID,ENAME\] 1. 2. 3. 4. 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:-** 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** **[Table: Department]** 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.