Game Preview

Functions in Python

  •  English    13     Public
    Differentiate between methods and functions and use them correctly in a computer program
  •   Study   Slideshow
  • _______________ keyword is used for creating a function in Python.
    def
  •  10
  • True or False: A function header in Python contains a list of arguments.
    False
  •  10
  • True or False: print() is a user-defined function.
    False
  •  10
  • The values being passed through a function call statement are called _________________.
    arguments
  •  10
  • The variables used in the function header are called ___________________.
    parameters
  •  10
  • What is the name of the function?
    my_function
  •  10
  • How many parameters does the function have?
    0
  •  10
  • True or False: data = 10 is a global variable.
    True
  •  10
  • True of False: data = 20 is a global variable.
    False
  •  10
  • What is the output of the following code segment?
    10
  •  10
  • What is the output of the following code segment?
    20
  •  10
  • What is the output of the following code segment?
    No output will be displayed!
  •  10
  • In which order the following lines of code will be processed by Python compiler?
    4, 1, 2
  •  10