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 keyword is used to define a function?

View

What is the default return value of a function that doesn’t return anything explicitly?

View

How do you pass default values to function parameters?

View

Which function returns the length of an object like a list or string?

View

What is the output of print(abs(-3))?

View

What is a function called when it is defined without a name?

View

Which of the following functions converts a string to a floating-point number?

View

What is the keyword to return a value from a function?

View

How many positional arguments can a function take?

View

What is the keyword to return a value from a function?

View

Which keyword is used to define a function?

function
def
func
lambda

What is the default return value of a function that doesn’t return anything explicitly?

0
None
False
undefined

How do you pass default values to function parameters?

def func(a, b=2):
func(a, 2=b):
func(a=2, b)
func(a: 2, b)

Which function returns the length of an object like a list or string?

size()
count()
len()
range()

What is the output of print(abs(-3))?

-3
0
3
Error

What is a function called when it is defined without a name?

Anonymous function
Callback function
Static function
Generator function

Which of the following functions converts a string to a floating-point number?

str()
int()
float()
eval()

What is the keyword to return a value from a function?

return
yield
break
continue

How many positional arguments can a function take?

1
2
Any number
None

What is the keyword to return a value from a function?

return
yield
break
continue