1. Question 1: What are the advantages of using functions in Python?
    1. Avoid having to repeat code that executes similar tasks.
    2. Separate complex problems into simpler parts.
    3. Clear, more manageable code
    4. All answers are correct.
  2. Question 2: Python has 2 main types of functions, that is:
    1. Custom function & User defined function
    2. Built-in function & User defined function
    3. Built-in function & User function
    4. System function & User function
  3. Question 3: Where is the function declared?
    1. Module
    2. Class
    3. In another function
    4. All of the above
  4. Question 4: Where is the element called when the function is declared in a class?
    1. Module
    2. Class
    3. Method
    4. Another function
  5. Question 5: Choose the correct answer when talking about the function id () in Python?
    1. Id () returns an object identifier.
    2. Each object not only has a unique id.
    3. Both options are true.
    4. There is no right answer.
  6. Question 6: What is the output of the program below?
     def cube(x): 
    return x * x * x
    x = cube(3)
    print x
    1. 9
    2. 3
    3. 27
    4. 30
  7. Question 7: What is the output of the program below?
     def C2F(c): 
    return c * 9/5 + 32
    print C2F(100)
    print C2F(0)
    1. 212
      32
    2. 314
      24
    3. 567
      98
    4. There is no right answer
  8. Question 8: What is the output of the program below?
     def power(x, y=2): 
    r = 1
    for i in range(y):
    r = r * x
    return r
    print power(3)
    print power(3, 3)
    1. 212
      32
    2. 9
      27
    3. 567
      98
    4. There is no right answer.
  9. Question 9: What is the output of the program below?
     def sum(*args): 
    '''Hàm trả về tổng
    của các giá trị'''
    r = 0
    for i in args:
    r += i
    return r
    print sum.__doc__
    print sum(1, 2, 3)
    print sum(1, 2, 3, 4, 5)
    1. 6
      15
    2. 6
      100
    3. 123
      12345
    4. There is no right answer
  10. Question 10: What is the output of the program below?
     def printMax(a, b): 
    if a > b:
    print(a, 'là số lớn nhất')
    elif a == b:
    print(a, 'bằng', b)
    else:
    print(b, 'là số lớn nhất')
    printMax(5, 6)
    1. 5
    2. 6
    3. 6 is the largest number
    4. There is no right answer