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

What is a variable in Python?

View

Which statement about variables is correct?

View

What is variable scope?

View

What happens if two variables refer to the same object?

View

What is the lifetime of a variable inside a function?

View

Can a global variable be changed inside a function?

View

Which of the following is true about Python variables?

View

What does the is operator check?

View

What is a reserved word in Python?

View

What is the difference between a local and global variable?

View

What is a variable in Python?

A reserved keyword
A name used to refer to data stored in memory
A built-in function
A type of loop

Which statement about variables is correct?

Variables need explicit declaration
Variables can change types during execution
Variable names can start with a number
Variables are case-insensitive

What is variable scope?

The type of a variable
The memory location of a variable
The part of the program where the variable is accessible
The speed of variable assignment

What happens if two variables refer to the same object?

Both are deleted
Changing one affects the other
A new object is created
They operate independently

What is the lifetime of a variable inside a function?

Until the program exits
Until the function completes execution
Permanent
Until memory is cleared

Can a global variable be changed inside a function?

No
Yes, if declared with the global keyword
Only if passed as a parameter
Only with the const keyword

Which of the following is true about Python variables?

Python variables have fixed memory addresses
Variables can be reassigned different types
Variables must be declared before use
Python supports typed variables only

What does the is operator check?

Value equality
Memory address equality
Data type equality
Object length

What is a reserved word in Python?

A keyword that can be used as a variable
A special character used in variable names
A word with a predefined meaning in Python
A type of error

What is the difference between a local and global variable?

Scope and lifetime
Size in memory
Execution speed
Data type