Question Bank

3705 approved questions from the community

A decorator is a higher-order function that can modify the behavior of another function without changing its source code.

MEDIUM
TRUE FALSE
30s
Python
by Mohamed

What does the '*args' syntax in a function definition do?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

Which of the following describes a key limitation of lambda functions in Python?

MEDIUM
SINGLE CHOICE
30s
Python
by Mohamed

According to the LEGB rule, what is the order of variable resolution in Python?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

What is the difference between the '==' and 'is' operators?

MEDIUM
SINGLE CHOICE
30s
Python
by Mohamed

Which method can be used to merge two lists into a dictionary mapping keys to values?

EASY
SINGLE CHOICE
30s
Python
by Mohamed

What is the primary difference in memory behavior between a list and a tuple?

MEDIUM
SINGLE CHOICE
40s
Python
by Mohamed

Which block in a try-except statement executes only if no exception was raised in the try block?

MEDIUM
SINGLE CHOICE
35s
Python
by Mohamed

In Python, modifying a mutable object (like a list) inside a function will affect the original object outside the function.

MEDIUM
TRUE FALSE
25s
Python
by Mohamed

Which of these is an example of an immutable data type in Python?

EASY
SINGLE CHOICE
30s
Python
by Mohamed

What are the primary mechanisms Python uses for garbage collection?

HARD
SINGLE CHOICE
45s
Python
by Mohamed

PEP 8 is the official style guide for Python code that recommends using 4 spaces per indentation level.

EASY
TRUE FALSE
20s
Python
by Mohamed

How is Python code executed by the CPython interpreter?

MEDIUM
SINGLE CHOICE
40s
Python
by Mohamed

What are the key features of Python?

EASY
SINGLE CHOICE
30s
Python
by Mohamed

What is the difference between 'mouseenter' and 'mouseover'?

MEDIUM
SINGLE CHOICE
35s
Javascript
by Mohamed

All browser events bubble up from the target element to the root of the document.

EASY
TRUE FALSE
25s
Javascript
by Mohamed

When comparing ES2015 classes to ES5 function constructors, what is the 'super()' call used for?

MEDIUM
SINGLE CHOICE
35s
Javascript
by Mohamed

What is a higher-order function?

EASY
SINGLE CHOICE
30s
Javascript
by Mohamed

How would you define a closure in JavaScript?

MEDIUM
SINGLE CHOICE
45s
Javascript
by Mohamed

Which of the following is a typical use case for anonymous functions in JavaScript?

MEDIUM
SINGLE CHOICE
30s
Javascript
by Mohamed
PreviousPage 184 of 186Next