GoConqr has a new look! Let us know what you think.

Quiz

Multiple Choice Questions - Functions

Aparna Dhirde 11 questions

Take the quiz

Questions in this quiz (11)

  1. 1Which keyword is use for function?.
    1. Adefine
    2. Bfun
    3. Cdef
    4. Dfunction
  2. 2Which of the following items are present in the function header?.
    1. Afunction name
    2. Bparameter list
    3. Creturn value
    4. DBoth A and B
  3. 3If return statement is not used inside the function, the function will return:.
    1. ANone
    2. B0
    3. CNull
    4. DArbitary value
  4. 4Which of the following function headers is correct?.
    1. Adef fun(a = 2, b = 3, c)
    2. Bdef fun(a = 2, b, c = 3)
    3. Cdef fun(a, b = 2, c = 3)
    4. Ddef fun(a, b, c = 3, d)
  5. 5Which of the following is the use of function in python?
    1. AFunctions are reusable pieces of programs
    2. BFunctions don’t provide better modularity for your application
    3. Cyou can’t also create your own functions
    4. DAll of the mentioned
  6. 6Which of the following is a feature of DocString?
    1. AProvide a convenient way of associating documentation with Python modules, functions, classes, and methods
    2. BAll functions should have a docstring
    3. CDocstrings can be accessed by the __doc__ attribute on objects
    4. DAll of the mentioned
  7. 7What is the default return value for a function that does not return any value explicitly?
    1. ANone
    2. Bint
    3. Cdouble
    4. Dpublic
    5. Enull
  8. 8Which of the following items are present in the function header?
    1. Afunction name
    2. Bfunction name and parameter list
    3. Cparameter list
    4. Dreturn value
  9. 9Which of the following enclose the input parameters or arguments of a function?
    1. Abrackets
    2. Bparentheses
    3. Ccurly braces
    4. Dquotation marks
  10. 10What will be the output of the following Python code?.
    def function1(var1=5, var2=7):
    var2=9
    var1=3
    print (var1, " ", var2)
    function1(10,12)
    1. A5 7
    2. B3 9
    3. C10 12
    4. DError

Information

Description
Quiz on Multiple Choice Questions - Functions, created by Aparna Dhirde on 15/03/2020.
Language
English
Views
120
Tags
xi
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?