CBSE-CLASS-XII SERIES
Computer-science

Types Of Functions

12 previous year questions.

Volume: 12 Ques
Yield: Medium

High-Yield Trend

12
2024

Chapter Questions
12 MCQs

01
PYQ 2024
medium
computer-science ID: cbse-cla

The SELECT statement when combined with clause, returns records without repetition.

1

DISTINCT

2

DESCRIBE

3

UNIQUE

4

NULL

02
PYQ 2024
medium
computer-science ID: cbse-cla

Differentiate between 'w' and 'a' file modes in Python.

03
PYQ 2024
easy
computer-science ID: cbse-cla
Consider the tables Admin and Transport given below:
Table: Admin


Table: Transport

Write SQL queries for the following:
  1. Display the student name and their stop name from the tables Admin and Transport.
  2. Display the number of students whose S_type is not known.
  3. Display all details of the students whose name starts with 'V'.
  4. Display student ID and address in alphabetical order of student name, from the table Admin.
04
PYQ 2024
medium
computer-science ID: cbse-cla

Write a function, c_words(), in Python that separately counts and displays the number of uppercase and lowercase alphabets in a text file, Words.txt

05
PYQ 2024
medium
computer-science ID: cbse-cla

Ms. Veda created a table named Sports in a MySQL database, containing columns Game_id, P_Age, and G_name.
After creating the table, she realized that the attribute Category has to be added.
Help her to write a command to add the Category column.
Thereafter, write the command to insert the following record in the table: Game_id: G42 P\_Age: Above 18 G_name: Chess Category: Senior

06
PYQ 2024
medium
computer-science ID: cbse-cla

Write a user-defined function in Python named Puzzle(W, N) which takes the argument W as an English word and N as an integer and returns the string where every Nth alphabet of the word W is replaced with an underscore ("_").

Example: If W contains the word "TELEVISION" and N is 3, then the function should return the string "TE_EV_SI_N". Likewise, for the word "TELEVISION" if N is 4, the function should return "TEL_VIS_ON".

07
PYQ 2024
medium
computer-science ID: cbse-cla

Define the term web hosting.
Name any two web browsers.

08
PYQ 2024
medium
computer-science ID: cbse-cla

Assertion (A): CSV file is a human-readable text file where each line has a number of fields, separated by a comma or some other delimiter.
Reason (R): writerow() method is used to write a single row in a CSV file.
Mark the correct choice:

1
Both (A) and (R) are true and (R) is the correct explanation for (A).
2
Both (A) and (R) are true and (R) is not the correct explanation for (A).
3
(A) is true but (R) is false.
4
(A) is false but (R) is true.
09
PYQ 2024
medium
computer-science ID: cbse-cla
Which of the following is not a DDL command in SQL?
1

DROP

2

CREATE

3

UPDATE

4

ALTER

10
PYQ 2024
medium
computer-science ID: cbse-cla
Which of the following options is the correct unit of measurement for network bandwidth?
1

KB

2

Bit

3

Hz

4

Km

11
PYQ 2024
medium
computer-science ID: cbse-cla
Consider the statements given below and then choose the correct output from the given options:
myStr = "MISSISSIPPI"
print(myStr[:4] + "#" + myStr[-5:]) 
1

MISSI#SIPPI

2

MISS#SIPPI

3

MISS#IPPIS

4

MISSI#IPPIS

12
PYQ 2024
medium
computer-science ID: cbse-cla

In SQL, the aggregate function which will display the cardinality of the table is .

1

sum()

2

count(*)

3

avg()

4

sum(*)