wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Section A: Assertion-Reasoning Questions

Total questions: 35

Worksheet time: 26mins

Name
Class
Date
1.
Assertion (A): In Python, x = y = [1, 2, 3]; x.append(4) modifies both x and y. Reason (R): Mutable objects in Python share references when assigned.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
2.
Assertion (A): The expression 0.1 + 0.2 == 0.3 evaluates to False in Python. Reason (R): Floating-point arithmetic introduces binary representation errors.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
3.
Assertion (A): Strings in Python cannot be modified once created. Reason (R): Strings are immutable, and modifications return a new object.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
4.
Assertion (A): The statement L = [1, 2, 3] * 2 creates [1, 2, 3, 1, 2, 3]. Reason (R): The * operator performs shallow replication of list elements.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
5.
Assertion (A): The expression bool("False") returns True. Reason (R): Any non-empty string evaluates as True in Boolean context.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
6.
Assertion (A): The is operator checks equality of value. Reason (R): The is operator compares identity, not value equality.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
7.
Assertion (A): The finally block executes even if no exception occurs. Reason (R): It ensures cleanup actions always execute.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
8.
Assertion (A): The copy() method creates a deep copy of a list. Reason (R): copy() duplicates only top-level references.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
9.
Assertion (A): The sum() function works on an empty list but max() raises an error. Reason (R): sum() returns identity 0, but max() needs at least one element.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
10.
Assertion (A): open("data.txt","x") creates a file and fails if it already exists. Reason (R): Mode ‘x’ ensures exclusive file creation.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
11.
Assertion (A): The pickle module stores Python objects in text form. Reason (R): Pickled data must be saved as binary because it contains bytes.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
12.
Assertion (A): When writing CSV files on Windows, an extra blank line appears. Reason (R): newline='' must be used in open() to prevent double line endings.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
13.
Assertion (A): assert statements can help debugging. Reason (R): They raise AssertionError when condition fails.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
14.
Assertion (A): DELETE removes both structure and data of a table. Reason (R): DROP removes structure; DELETE only removes data.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
15.
Assertion (A): UPDATE without WHERE changes all records. Reason (R): SQL executes without filters if no condition specified.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
16.
Assertion (A): DISTINCT can be used with aggregates. Reason (R): COUNT(DISTINCT col) ignores duplicates before counting.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
17.
Assertion (A): GROUP BY requires at least one aggregate. Reason (R): It groups data even without aggregation.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
18.
Assertion (A): COMMIT saves all DML changes permanently. Reason (R): Changes stay pending until COMMIT is done.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
19.
Assertion (A): Foreign keys cannot store NULL. Reason (R): They must always reference valid primary key values.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
20.
Assertion (A): ROLLBACK reverses committed transactions. Reason (R): It only undoes uncommitted changes.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
21.
Assertion (A): In a bus topology, performance decreases as devices increase. Reason (R): More devices cause more collisions.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
22.
Assertion (A): In a star topology, one node failure stops the network. Reason (R): Central hub failure halts all communication.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
23.
Assertion (A): IPv6 does not require DHCP. Reason (R): It uses NDP for auto-configuration.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
24.
Assertion (A): SMTP retrieves email, POP3 sends it. Reason (R): SMTP = port 25, POP3 = port 110.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
25.
Assertion (A): The CIA triad includes Confidentiality, Integrity, Availability. Reason (R): These principles protect data accuracy, secrecy, and access.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
26.
Assertion (A): Passing mutable objects to functions preserves changes. Reason (R): Arguments are passed by reference for mutable data.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
27.
Assertion (A): Executing a = [1,2,3]; b = a; a += [4] modifies both. Reason (R): += mutates the original list.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
28.
Assertion (A): eval("2+3*4") gives 20. Reason (R): eval() uses left-to-right evaluation.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
29.
Assertion (A): x=[1,2,3]; y=x; x=x+[4] leaves y unchanged. Reason (R): + operator creates new list instead of modifying.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
30.
Assertion (A): print('a'*True + 'b'*False) prints 'a'. Reason (R): True=1, False=0 in arithmetic.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
31.
Assertion (A): copy() reflects original list changes. Reason (R): It creates a deep copy.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
32.
Assertion (A): In for…else, else runs only if no break occurs. Reason (R): else executes when the loop completes normally.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
33.
Assertion (A): After writing in 'a+' mode, reading shows nothing until seek(0). Reason (R): In 'a+' mode, pointer stays at end.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
34.
Assertion (A): print(1 in {1:"A",2:"B"}.values()) prints False. Reason (R): in checks keys, not values.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.
35.
Assertion (A): A Python function with no return outputs None. Reason (R): The interpreter adds return None implicitly.
a)
Both A and R are true, and R correctly explains A.
b)
Both A and R are true, but R does not explain A.
c)
A is true, but R is false.
d)
A is false, but R is true.