PARADIGM
CONSTRUCTS
TESTING AND DEBUGGING
SQL
*_* MYSTERY *_* It can be out of the box, take at your own risk!
100

What specific things does paradigm provide to facilitate developers? (mandatory 2)

Tools and Techniques

100

Tuples are represented by the symbols ____________ and are ____________.

‘(_,_,_)’ and immutable

100

Debug this:

matrix=.....any  matrix.....

for col in range(len(matrix)):

     new_row = []

     for row in range(len(matrix)):

           new_row.append(matrix[row][col])

for row in transpose:

print(row)

for col in range(len(matrix[0])):

This "[0]" is mandatory as without this, matrix elements cannot be accessed.

100

Which of the following queries will not list students from the Students table in ALPHABETICAL order?

a) SELECT * FROM Students ORDER BY name ASC;
b) SELECT * FROM Students ORDER BY name DESC;
c) SELECT * FROM Students ORDER BY age ASC;
d) SELECT * FROM Students ORDER BY name;  

c) SELECT * FROM Students ORDER BY age ASC;

100

The function to get memory address of an object is ________().

id

200
What does functional programming require that is counted as a difficulty? (mandatory 2)

It requires CAREFUL HANDLING AND SYNCHRONIZATION

200

In order for keys to be used for searching, they must be unchangeable types of data like ________________, ____, and ______.

Strings, Integers and Tuples

200

Python's built-in ____ framework is a tool that helps you check if your code works in the desired way.

UNIT TEST

200

Which of the following is not valid SQL syntax?
a) SELECT * FROM Students ORDER BY name;
b) SELECT student_id, name FROM Students;
c) INSERT INTO Students (name, age, grade VALUES ('Ali', 14, '8th');
d) DELETE FROM Students WHERE student_id = 1;

c) INSERT INTO Students (name, age, grade VALUES ('Ali', 14, '8th');

200

How many types of databases are there?

a) 2 mainly, but others are also used.

b) 2 only, others are not used.

c) 2

d) 2, but others are used more than these.

a) 2 mainly, but others are also used.

300

OOP paradigm is the emphasis in problem-solving is on objects and not the _______________.

LOGIC

300

In which of these is a unique label?

a) Dictionary

b) Tuple

c) Strings

d) Labeled List

a) Dictionary

300

How does a breakpoint work? Also tell the minimum and maximum amount of breakpoints you can add/use in a SINGLE program?

A breakpoint pauses a program at a chosen line so you can check variables and debug. You can have 0 breakpoints minimum, and the maximum depends on the debugger, usually what you desire.

300

The clause used to sort query results is ________.

ORDER BY

300

You want real-time collision detection, moving sprites, and sound effects. Which library will let you do this most efficiently, and why? 

PYGAME;

Turtle and Tkinter can only alter graphics, and THEY ARE NOT MEANT FOR GAMES. Turtle is mainly for learning and drawing shapes, while Tkinter is for GUI applications like forms and buttons. Pygame, on the other hand, is designed for game development and provides built-in support for sprites, animations, sounds, and real-time input, making it the best choice for creating games in Python.

400

Which representational mechanism exposes only the indispensable functional essence of an entity while obfuscating its underlying intricacies?

Abstraction

400

To find transpose of a certain matrix, which construct is used?

Nested List

400

Best IDE for debugging and testing is __________.

Visual Studio.Net

400

How to query a record from a respective table? Which one thing is mandatory without which it is not possible?

SELECT * FROM TABLE;

"*" is one thing without which it is not possible.

400

print(0.1 + 0.2 == 0.3)

Answer: False
Explanation: Floating-point arithmetic is not exact in Python.

500

Within the epistemological framework of object-oriented computational architectures, which foundational construct operationalises the deliberate occlusion of an entity’s ontological state by restricting mutative and observational affordances exclusively to sanctioned procedural interfaces?

Encapsulation

500

What does 3NF do? It is a step of which component?

It eliminates transitive dependencies. It is a step of Data Normalization.

500

Give idea on how to multiply 2 numbers with tests USING PYTHON.

def multiply(a, b):

    return a * b

def test_multiply():

    result = multiply(2, 3)

    assert result == 6, f"test failed: Expected 6 but got {result}"

    result = multiply(4, 0)

    assert result == 0, f"test failed: Expected 0 but got {result}"

    result = multiply(-1, -1)

    assert result == 1, f"test failed: Expected 1 but got {result}"

    print("All tests passed!")

test_multiply()

500

To access the interactive SQLite shell;

-Open your terminal for command prompt and type _____ and press Enter.

'sqlite3'

500

Debug this:

SELECT P.product_name, SUM(O.quantity) AS total_sold

FROM Orders O

JOIN Products P ON O.product_id = P.product_id

WHERE O.date >= '2025-10-01' AND O.date <= '2025-10-31'

GROUP BY P.product_name

ORDER BY total_sold DESC

LIMIT 5;

It was correct, thank you for wasting your time.