UPDATED OA | 200 Questions & Answers | GUARANTEED
PASS Study Guide
Questions 1–200
SECTION 1: VARIABLES, DATA TYPES, AND TYPE CASTING
1. What is the correct way to create a variable named `age`
with the value 25 in Python?
A) `age == 25`
B) `age := 25`
C) `age = 25`
D) `int age = 25`
,Answer C: `age = 25`
Rationale: Python uses the assignment operator `=` to assign
values to variables. No type declaration is needed.
2. Which of the following is a valid Boolean value in Python?
A) `"True"`
B) `true`
C) `True`
D) `1`
Answer C: `True`
Rationale: Python's Boolean values are `True` and `False`
(capitalized). `"True"` is a string, `true` is not a valid keyword
(case-sensitive), and `1` is an integer.
3. What is the output of `bool(0)`?
A) `True`
B) `False`
,C) `0`
D) `None`
Answer B: `False`
Rationale: In Python, `0` is considered `False` when converted
to a Boolean. Any non-zero number is `True`.
4. What is the output of `bool("")` (empty string)?
A) `True`
B) `False`
C) `""`
D) `Error`
Answer B: `False`
Rationale: An empty string is considered `False` in a Boolean
context. Non-empty strings are `True`.
5. What is the output of `bool([])` (empty list)?
A) `True`
, B) `False`
C) `[]`
D) `Error`
Answer B: `False`
Rationale: An empty list is considered `False` in a Boolean
context. Non-empty lists are `True`.
6. Which of the following is NOT a valid Python variable
name?
A) `my_var`
B) `myVar`
C) `True`
D) `_my_var`
Answer C: `True`
Rationale: `True` and `False` are reserved keywords (Boolean
values) in Python and cannot be used as variable names.