Introduction to Python

Quiz 5: Functions in Python

Lesson 5: Functions in Python

Quiz 5: Functions in Python

Time limit: 10 minutes

1. Built-in Python functions like print() and input() require an import statement to use.

1 pt
  • True
  • False

2. Which keyword is used to define a function in Python?

1 pt
  • function
  • define
  • def
  • func

3. What does math.sqrt(64) return?

1 pt
  • 6.0
  • 8.0
  • 32.0
  • 4.0

4. A function must always have a return statement.

1 pt
  • True
  • False

5. What is the correct formula for Simple Interest?

1 pt
  • SI = P + R + T
  • SI = (P × R × T) / 100
  • SI = P × (1 + R/100)^T
  • SI = P × R / T

6. Which built-in function returns the largest value among given arguments?

1 pt
  • largest()
  • top()
  • max()
  • high()

7. Arrange the following parts of a function definition in the correct order:

2 pts
  • return result
  • def calculate(a, b):
  • result = a + b
  • Call the function: calculate(5, 3)

Subscribe to our newsletter.

Get updates to news and events.