CS Sample Paper Class 12 Term 2
Sample Paper Class 12 Term 2
COMPUTER SCIENCE (Code: 083)
Maximum Marks: 35
Time: 2 hours
General Instructions
- The question paper is divided into 3 sections – A, B and C
- Section A, consists of 7 questions (1-7). Each question carries 2 marks.
- Section B, consists of 3 questions (8-10). Each question carries 3 marks.
- Section C, consists of 3 questions (11-13). Each question carries 4 marks.
- Internal choices have been given for question numbers 7, 8 and 12.
Section -A
Each question carries 2 marks
Q1. What is the purpose of pop() and push() function in stack?
Q2. Write full form of POP and HTTP. Which of the following is the fastest medium of communication.
Ethernet cable, Optical Fiber, Co-axial Cable
Q3. Define the following terms:
- Primary Key
- Candidate Key
Q4. What is the difference between fetchone() and fetchmany() methods?
Q5. Write the output of the queries (a) to (d) based on the table,
“Student” given below:
Name | Class | DOB | Fees | Gender |
Aman | 9 | 2001-08-28 | 2500 | M |
Sumit | 10 | 2000-01-28 | 3000 | M |
Naman | 9 | 2001-12-05 | 3200 | M |
Rani | 11 | 1999-09-03 | 2300 | F |
a. Select min(Fees) from Student;
b. Select * from Student where Fee >=3000 and Class = 9;
c. Select * from Student where Name like “%n”;
d. Select * from student where Gender = “M” order by Fees;
Q6. What is the difference between char and varchar data type of MySQL?
Q7. What do you mean by degree and cardinality? A table “Book” has 3 attributes and 7 tuples. Write the degree and cardinality of table “Book”.
OR
Q7. Consider the following table “stock” and answer the following:
S_id | Type | Price | Quantity | Date_of_purchase |
S12 | A4-Paper | 500 | 10 | 2020-02-14 |
S43 | Computer | 20000 | 11 | 2022-01-23 |
S32 | Printer | 5000 | NULL | 2021-08-20 |
S22 | Curtain | 3500 | 9 | 2019-08-16 |
S11 | Tape | 250 | 20 | 2018-04-18 |
- Which field can act as primary key?
- Write the degree and cardinality of table “stock”.
Section -B
Each question carries 3 marks
Q8. Suman has created a dictionary “Item” with item name as key and their cost as values. Write a user defined functions to perform the following operations:
(a) Push the names of those items into a stack whose cost is less than 500
(b) Pop the elements of the stack and display the names of items.
For example:
If the sample content of the dictionary is as follows:
D = {"Book" : 600, "Cup Set" : 450, "Mobile Cover" : 300, "Mouse" : 250}
The output from the program should be:
Cup Set
Mobile Cover
Mouse
OR
Q8. Kartik has created a list ‘alpha’ containing any 10 alphabets of English alphabets. Write a user defined functions to perform the following operations:
- Traverse the content of the list and push all the vowels into a stack.
- Pop and display the content of the stack.
For Example: If the sample Content of the list is as follows: N = ['A', 'C', 'B', 'G', 'J', 'E', 'K', 'L', 'O', 'D'] Sample Output of the code should be: A E O
Q9. Aman has written the following queries. Both the queries are giving some error. Help him to write the correct query.
- Select * from book where price = NULL;
- Select class, fees from students where name = “%t”;
Q10. Raman wants to perform the following task in MySQL. Help him to write the commands for the following task.
- Create a database named “school” in MySQL.
- Create the following table “Employee”:
Field Name | Data type | Constraint |
E_name | Varchar(30) | Not Null |
E_id | Integer | Primary Key |
Salary | Integer | |
Dept | Varchar(25) |
Section -C
Each question carries 4 marks
Q11. Write queries (a) to (d) based on the tables STUDENT and BOOK given below:
STUDENT :
S_id | Name | Class | Fees |
S121 | Aman | 9 | 2500 |
S123 | Raman | 10 | 3000 |
S124 | Ram | 10 | 2800 |
BOOK :
B_id | S_id | Author | Subject | Cost |
1002 | S121 | Mr. Khanna | English | 500 |
1321 | S124 | Mr. Sharma | Math | 350 |
1005 | S125 | Mr. Agarwal | Science | 280 |
- Display details of students in increasing order of Fees.
- Display student name and respective Author name.
- Display Author Name, Subject of those books whose cost is more than 300 and less than 500.
- Display details of those students whose names ends with ‘n’.
Q12. Answer the following questions:
1. What is the difference between Switch and Hub?
OR
What is the difference between Packet switching and Circuit Switching?
2. Explain the terms VoIP and TELNET.
Q13. A, B, C, and D are four buildings of an IT company. Mr Ramesh want to connect all the four buildings .
The distance between various buildings are as follows:
A to B – 200m
A to C – 150m
A to D – 50m
B to C – 250m
B to D – 350m
C to D – 350m
Number of computers in each building are
A – 160
B – 130
C – 80
D – 50
Based on the above specifications, answer the following questions:
1. Suggest the cable layout of connections between the buildings.
2. Suggest the most suitable building to house the server, with suitable reason.
3. Suggest the placement of the following device with justification
- Repeater
- Hub/Switch
4. Suggest the most suitable wire for fast and secure .
Disclaimer : I tried to give you the correct format of “CS Sample Paper Class 12 Term 2” , but if you feel that there is/are mistakes in the Questions of “ CS Sample Paper Class 12 Term 2 “ given above, you can directly contact me at csiplearninghub@gmail.com. NCERT book and CBSE study material is used to create “ CS Sample Paper Class 12 Term 2 “ questions.
CS Sample Paper Class 12 Term 2
MCQ of Computer Science Chapter Wise
2. Flow of Control (Loop and Conditional statement)
3. 140+ MCQ on Introduction to Python
4. 120 MCQ on String in Python
7. 100+ MCQ on Flow of Control in Python
8. 60+ MCQ on Dictionary in Python
Important Links
100 Practice Questions on Python Fundamentals
120+ MySQL Practice Questions
90+ Practice Questions on List
50+ Output based Practice Questions
100 Practice Questions on String
70 Practice Questions on Loops
70 Practice Questions on if-else
Computer Science Syllabus 2021-2022.
Informatics Practices Syllabus 2021-2022
Class 12 Computer Science Chapter wise MCQ