Completed
Quick Test
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:
7Q2mcq1 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 24Q4mcq1 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