Python functions Book Back Questions & Answers
Unit 7 > Computer Science > Class 12 > Samacheer Kalvi - English Medium
-
1. A named blocks of code that are designed to do one specific job is called as
(a) Loop
(b) Branching
(c) Function
(d) Block
Correct answer: (c) Function
-
2. A Function which calls itself is called as
(a) Built in
(b) Recursion
(c) Lambda
(d) Return
Correct answer: (b) Recursion
-
3. Which function is called anonymous un named function?
(a) Lambda
(b) Recursion
(c) Function
(d) Define
Correct answer: (a) Lambda
-
4. Which of the following keyword is used to begin the function block?
(a) Define
(b) For
(c) Finally
(d) Def
Correct answer: (d) Def
-
5. Which of the following keyword is used to exit a function block?
(a) Define
(b) Return
(c) Finally
(d) Def
Correct answer: (b) Return
-
6. While defining a function which of the following symbol is used.
(a) ; (semicolon)
(b) . (dot)
(c) : (colon)
(d) $ (dollar)
Correct answer: (c) : (colon)
-
7. In which arguments the correct positional order is passed to a function?
(a) Required
(b) Keyword
(c) Default
(d) Variable length
Correct answer: (a) Required
-
8. Read the following statement and choose the correct statement(s). (I) In Python, you dont have to mention the specific data types while defining function. (II) Python keywords can be used as function name.
(a) (I) is correct and (II) is wrong
(b) Both are correct
(c) (I) is wrong and (II) is correct
(d) Both are wrong
Correct answer: (a) (I) is correct and (II) is wrong
-
9. Pick the correct one to execute the given statement successfully. if_: print (x, is a leap year)
(a) x % 2 = 0
(b) x % 4 = = 0
(c) x / 4 = 0
(d) x % 4 = 0
Correct answer: (b) x % 4 = = 0
-
10. Which of the following keyword is used to define the function testpython():?
(a) Define
(b) Pass
(c) Def
(d) While
Correct answer: (c) Def