0% found this document useful (0 votes)
13 views2 pages

CS Worksheet

This worksheet for 12th-grade Computer Science includes questions on Python programming, data structures, algorithms, database management, and networking. It consists of multiple choice, short answer, and long answer questions, covering topics such as data types, file handling, SQL queries, and networking concepts. Students are instructed to use Python for programming tasks and are assessed on their understanding of the subject matter.

Uploaded by

kridaysingh20003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

CS Worksheet

This worksheet for 12th-grade Computer Science includes questions on Python programming, data structures, algorithms, database management, and networking. It consists of multiple choice, short answer, and long answer questions, covering topics such as data types, file handling, SQL queries, and networking concepts. Students are instructed to use Python for programming tasks and are assessed on their understanding of the subject matter.

Uploaded by

kridaysingh20003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

WORKSHEET

Class:12th Date:27-12-2024
Subject: Computer Science

General Instructions:
1. All questions are compulsory.
2. Programming language: Python.
3. Marks are indicated against each question.
4. Use proper syntax and indentation in programming questions.

Section A: Fundamentals of Python Programming (25 Marks)


1. Multiple Choice Questions: (1×5=5 Marks)
a. What is the output of print(type(3.0))?
i. int
ii. float
iii. str
iv. None

b. Which of the following is not a valid Python data type?


i. list
ii. tuple
iii. set
iv. array

c. What is the correct way to declare a dictionary?


i. {}
ii. []
iii. ()
iv. <>
d. Which of these functions is used to read a file in Python?
i. read()
ii. write()
iii. close()
iv. open()

e. Which statement is used to handle exceptions in Python?


i. try
ii. except
iii. finally
iv. All of the above
2. Short Answer Questions: (2×5=10 Marks)
a. Differentiate between mutable and immutable data types with examples. (2)
b. What is the purpose of the break and continue statements? (2)
c. Write a Python function to find the largest of three numbers. (2)
d. Explain the term 'Recursion' with an example. (2)
e. Define the following terms: i) Variable ii) Function (2)

3. Long Answer Question: (5 Marks)


Write a Python program to read a text file and count the frequency of each word. (5)

Section B: Data Structures and Algorithms (20 Marks)


4. Answer the following questions (any 4): (4×5=20 Marks)
a. Write a Python program to implement a stack using a list. (5)
b. Differentiate between linear and binary search algorithms. (5)
c. Write a Python function to reverse a queue. (5)
d. Explain the concept of a linked list and its types. (5)
e. Write a Python program to sort a list of numbers using bubble sort. (5)

Section C: Database Management and Networking (25 Marks)


5. SQL Queries: (2×5=10 Marks)
Consider the following table Student:

RollNo Name Class Marks Gender

101 Rohan 12 85 Male

102 Priya 12 92 Female

103 Ankit 12 78 Male

104 Tanya 12 88 Female

Write SQL commands for the following:


a. Display all records where marks are greater than 80. (2)
b. Add a new column Age to the table. (2)
c. Update marks of Priya to 95. (2)
d. Delete the record of Ankit. (2)
e. Display the total number of male students. (2)

6. Networking Questions: (3×5=15 Marks)


a. What is the difference between a switch and a router? (3)
b. Explain the concept of IP addressing. (3)
c. Differentiate between HTTP and HTTPS. (3)
d. What is a firewall? Mention its importance. (3)
e. Define the term 'Domain Name System' (DNS). (3)

Regards
Vice Principal

You might also like