Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
47 views

Computer

The document contains 25 programming problems related to functions, strings, lists, tuples, files and SQL queries for class 12 computer science students. Some examples include writing functions to find sum of digits or HCF of numbers, searching and updating records in a database, and performing CRUD operations on stacks, queues and CSV files. It also provides 5 multi-part SQL questions to define tables, insert data, and query records based on conditions.

Uploaded by

ansu das
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Computer

The document contains 25 programming problems related to functions, strings, lists, tuples, files and SQL queries for class 12 computer science students. Some examples include writing functions to find sum of digits or HCF of numbers, searching and updating records in a database, and performing CRUD operations on stacks, queues and CSV files. It also provides 5 multi-part SQL questions to define tables, insert data, and query records based on conditions.

Uploaded by

ansu das
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MADNAWATI PUBLIC SCHOOL, SAMBALPUR

Practical Programs of class XII Computer Science


For AISSCE Examination 2022-23
1. WAP with a function to find sum of digits of a number n which is passed as parameter in the function.
2. WAP with a function to find hcf of two numbers which are passed as parameters to the function.
3. WAP with a function that return largest, 2nd largest and smallest no of three numbers passing as parameters.
4. WAP with a function that have three sides of a triangle as parameters to print which type of triangle if
triangle possible for the three sides.
5. WAP with three functions for input of two numbers, for find numbers of primes within the numbers and to
show output.
6. WAP with a function passing a string as parameter to count numbers of vowels and numbers of consonants
and numbers of special characters.
7. WAP with a function passing a tuple of numbers as parameter to count no of one digit number, two digits
number, three digits number and more than three digits
8. WAP to read a tuple containing marks of n students and with a function having the tuple as parameter to
count numbers of students got more then 60 mark and less then 60 mark.
9. WAP to read a list of numbers and with a function having a list parameter to exchange every even position
no with next odd position no.
10. WAP to read a list of strings and with a function to create another string to store the no of characters of each
string of first list which have list of string as parameter.
11. WAP to Read a text file line by line and count no of line start with a character 'T'.
12. WAP to Read a text file line by line and count and display number of characters and number of words in
each line.
13. WAP to Read a text file and display the number of vowels/consonants/uppercase/lowercase characters
in the file.
14. WAP to Read a text file word by word and display those words start with a vowels character.
15. WAP to Search all the words that contain the character 'a' in a text file and write it to another text
file.
16. WAP to create a binary file and store name and roll no of n students in the form of dictionary.
17. WAP to Create a binary file with name and roll number. Search for a given roll number and
display the name, if not found display appropriate message.
18. WAP to Create a binary file with roll number, name and marks. Input a roll number and update the marks.
19. WAP to read following details of sports performance (sport, competitions, prize own) of your school of
different sports and store into a CSV file.
20. WAP to Create a CSV file by entering user-id and password of n users, read and search the password for
given user- id.
21. WAP a menu base program to perform the operation on Stack using list in python.
22. WAP a menu base program to perform the operation on queue using list in python.
23. WAP to connect with database and search employee number in table employee and display record , if
employee number not found display appropriate message.
24. WAP to connect with database and delete the record of entered employee no from employee table.
25. WAP to connect with database and update the employee record of entered employee no in employee table.

SQL
1. Write SQL command
(a) To define the table EMPLOYEE and insert following data to the table.
CODE NAME DEG SALARY
M12 Ranjan Executive 18000
B11 Manas Officer 12000
M13 Naveen Executive 16500
A01 Smita Trainee 10000
A02 Akash Trainee 9500
(b) To display all records those have designation ‘Executive’ or salary more then 11500.
(c) To count all records for salary <= 15000.
(d) To display all records those have name start with ‘M’.
(e) To arrange all the records of employee table according to ascending order of name.
2. Write SQL command
(a) To define the table STUDENT and insert following data to the table.
Sl No Name Stream Fees Age Sex
1 Pankaj Gupta Mechanical 450000 17 M
2 Shalini Panda Computer Sc. 350000 17 F
3 Binod Sahu Electrical 400000 17 M
4 Sushant Agrawal Mechanical 420000 17 M
5 Vikash Sharma Computer Sc. 380000 18 M
(b) To display the Name, Stream and fees of students who have taken stream as Computer Sc.
(c) To display the number of students stream wise.
(d) To display all details of students whose age is 17 in the ascending order of name.
(e) To display Name, Stream and fees of male students.

3. Write SQL command


(a) To define the table HOSPITAL and insert following data to the table.
No Name Age Dept Charges Sex
1 Arpit 62 Surgery 300 M
2 Zarina 22 ENT 250 F
3 Arun 12 ENT 300 M
4 Washim 19 Cardiology 800 M
5 Sephali 23 Orthopedic 250 F
(b) To display all patients who are in ENT department.
(c) To list names of female patients who are in ENT department.
(d) To display the name, age, charges to descending order of name.
(e) To show the sum of charges of male patients only.

4. Write SQL command


(a) To define the table CLUB and insert following data to the table.
C_CODE CNAME AGE SPORTS PAY
301 Mukesh 35 KARATE 10000
302 Harish 34 KARATE 12000
303 Karan 34 SQUASH 20000
304 Nitin 33 BASKET BALL 15000
305 Rajesh 30 SQUASH 12000
(b) To display cname, age, sports from club whose age>= 35 or pay<20000.
(c) To name, pay of all members whose sports is SQUASH.
(d) To count and display of all records for KARATE sports.
(e) To display the content of table club in descending order of age.

5. Write SQL command


(a) To define the table BANK and insert following data to the table.
Acc_No Cname Address Bname Amount Transaction
1 Manish Khetrajpur Bank of Boroda 35000 10
2 Sourav Khetrajpur State Bank 25000 09
3 Shuvam Pradhanpara Oriental Bank 18000 05
4 Seshab Hirakud State Bank 30000 11
5 Subash Hirakud Oriental Bank 20000 15
(b) To display the data for all customers whose transaction between 8 and 11.
(c) To display Cname, Address, Amount of customers whose are either from Kehetrajpur or Hirakud in
ascending order of Amount.
(d) To display no of customer of all the address for the bank.
(e) To display Cname, Bname and Amount for all customers in ascending order of Amount.

You might also like