Instructions

  • 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
  • 2. Thoroughly review each solution before proceeding to ensure full understanding.
  • 3. Final results will be available after submission to provide insights into areas for further improvement.
  • 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
  • 5. Once submitted, responses are final, so ensure you’re confident in your answers.
  • 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.

All Problems

Question

Action

Which of the following is a correct variable declaration in Python?

View

Which of these variable names is invalid?

View

How do you assign the value 10 to a variable x?

View

What will be the output of the following code: x = 5; x = x + 2; print(x)?

View

Which of the following keywords cannot be used as a variable name in Python?

View

What is the initial value of an uninitialized variable in Python?

View

Which operator is used to assign values to variables in Python?

View

What does the following code do: a, b = 1, 2?

View

What happens when you use an undefined variable?

View

What will be the output of the following code: x = 10; print(x, 'is assigned')?

View

Which of the following is a correct variable declaration in Python?

1variable = 5
variable1 = 5
int variable = 5
variable_1 = five

Which of these variable names is invalid?

my_var
myVar
my var
_myvar

How do you assign the value 10 to a variable x?

x == 10
x = 10
10 = x
x : 10

What will be the output of the following code: x = 5; x = x + 2; print(x)?

7
5
2
Error

Which of the following keywords cannot be used as a variable name in Python?

for
in
true
None

What is the initial value of an uninitialized variable in Python?

0
None
False
Error

Which operator is used to assign values to variables in Python?

==
=
+=
<=

What does the following code do: a, b = 1, 2?

Assigns a = 1 and b = 2
Assigns a = 2 and b = 1
Assigns a and b to 3
None of the above

What happens when you use an undefined variable?

Returns None
Raises an error
Assigns default value
Skips the statement

What will be the output of the following code: x = 10; print(x, 'is assigned')?

10 is assigned
x is assigned
is assigned
Error