Completed

Class 12 CS – Python & SQL Advanced Challenge

Class 12 · Computer Science Mon, 7 Sep 2026 8:36 AM 30s / question 5 questions · 5 marks

Questions From This Challenge

Q1output1 mark
What will be the output of the following Python code?
x = 3

for i in range(2, 6):
    if x % i == 0:
        x += i
    else:
        x -= 1

print(x)
Correct output: 7
Q2mcq1 mark
Consider the following SQL statements: CREATE TABLE Student ( RollNo INT PRIMARY KEY, Name VARCHAR(20), Marks INT ); INSERT INTO Student VALUES (101, 'A', 45); INSERT INTO Student VALUES (102, 'B', 55); INSERT INTO Student VALUES (103, 'C', 65); UPDATE Student SET Marks = Marks + 5 WHERE Marks < 60; DELETE FROM Student WHERE Marks BETWEEN 50 AND 60; Which RollNo values remain?
101 only
102 only
103 only ✓
101 and 103
Q3output1 mark
What will be the output of the following Python code?
n = 1
total = 0

while n < 10:
    n += 2
    if n % 4 == 0:
        continue
    total += n

print(n, total)
Correct output: 11 24
Q4mcq1 mark
Consider the following table: Employee(EmpID, Name, Salary, Email) EmpID is a PRIMARY KEY, Name is NOT NULL, and Email is UNIQUE. Which pair of records can be inserted successfully?
(101, 'Amit', 25000, 'a@x.com') and (102, 'Ravi', 30000, 'b@x.com') ✓
(101, 'Amit', 25000, 'a@x.com') and (101, 'Ravi', 30000, 'b@x.com')
(101, NULL, 25000, 'a@x.com') and (102, 'Ravi', 30000, 'b@x.com')
(101, 'Amit', 25000, 'a@x.com') and (102, 'Ravi', 30000, 'a@x.com')
Q5output1 mark
What will be the output of the following Python code?
x = 10

for i in range(2, 7):
    if i == 4:
        continue
    if i == 6:
        break
    x = x + i

print(x)
Correct output: 19
Next Live Challenge
Mixed: DML + Retrieval - Combined Application
Class 12 · Computer Science Fri, 23 Oct 2026, 9:00 PM
View Live Challenges →

← Back to Live Challenge History · Practice MCQs

CodeBuddy
Hi there! 👋 I'm CodeBuddy, your KV Coders assistant.

To help me give you the most accurate answers, please select your class and subject below, or just type your question!
Buddy is typing...