1) Which keyword is use for function? a) define b) fun c) def d) function 2) Which of the following items are present in the function header? a) function name b) parameter list c) return value d) Both A and B 3) What is called when a function is defined inside a class? a) class b) function c) method d) module 4) If return statement is not used inside the function, the function will return: a) None b) 0 c) Null d) Arbitary value 5) Which operator is used in Python to import modules from packages? a) . b) * c) -> d) & 6) Lambda is a function in python? a) True b) False c) Lambda is a function in python but user can not use it d) None of the above 7) What is a variable defined outside a function referred to as? a) local variable b) global variable c) static Variable d) automatic variable 8) How is a function declared in Python? a) def function function_name(): b) declare function function_name(): c) def function_name(): d) declare function_name(): 9) Which one of the following is the correct way of calling a function? a) function_name() b) call function_name() c) ret function_name() d) function function_name() 10) You can also create your own functions, these functions are called? a) built-in functions b) user-defined functions c) py function d) None of the above 11) The code block within every function starts with a ? a) ; b) :: c) : d) % 12) Python supports the creation of anonymous functions at runtime, using a construct called a) lambda b) pi c) anonymous d) none of the mentioned 13) Does Lambda contains return statements? a) True b) False 14) Lambda is a statement. a) True b) False 15) __________ are the arguments passed to a function in correct positional order. a) Required arguments b) Keyword arguments c) Default arguments d) Variable-length arguments

Tauler de classificació

Estil visual

Opcions

Canvia de fonament

Restaurar desada automàtica: ?