Function in Python MCQ for Class 12 Computer Science

Function in Python MCQ for CBSE Class 12 Computer Science students. Important Objective Questions from NCERT and Sumita Arora Python Book for examination point of view.

Q1. Which of the following is the reason to use Functions?
1) Reduce program size
2) Avoiding ambiguity
3) More easily understandable
4) All of the above

Show Answer
4) All of the above

Q2. Is there a mistake in code
def interest(principal =1000, rate, time)

1)True
2)false

Show Answer
1)True

Q.3. Which scope can be accessed by any part of the program?
1) program scope
2) volatile scope
3) Global scope
4) Local scope

Show Answer
3) Global scope

Q.4. Any scope which can be only accessed in the part is

1) program scope
2) volatile scope
3) Global scope
4) Local scope

Show Answer
4) Local scope

Q.5. Is Python variables are storage container?
1)True
2)False

Show Answer
2)False

Q.6. Python variables are like-
1) storage container
2) Memory references
3) Shifting references
4) work reference

Show Answer
2) Memory references

Q.7. Integer immutable in functions calling leads to failure to update the value at immutable place.
1) True
2) False

Show Answer
1) True

Q.8. What is a function ?

1. A function is a block code that runs when it is called.
2. A function is a block code that runs automatically.
3. A function is a bug in program.
4. A function extends the life of computer hardware and also is a hardware part.

Show Answer
1. A function is a block code that runs when it is called.

Q.9.

def calcSomething(x):
r=2*x**2
return r
calcSomething(3)

what will be the value of r:
a) 21
b) 18
c) 12
d) 6

Show Answer
b) 18

Q.10.Which of the method is for calling a function if code is –
def add(x,y)
1) add 5,6
2) add (2),3
3) sub (5,6)
4) add(5,6)

Show Answer
4)add(5,6)

Q.11. Which is not python function types.
a) Built-in function
b) absolute function
c)functions defined in modules
d)user defined function

Show Answer
b) absolute function

Q.12. ___________ is used in defining functions in turn of bracket?
a)Zeros
b)ctrl + p
c)Indentation
d)footer

Show Answer
c)Indentation

Q.13.What is Indentation?
a)The blank space in the beginning of a statement within a block.
b)The authorization used by computer to provide access to code.
c)the bracket at the end .
d)The ending space used by computer at the end of statement.

Show Answer
a)The blank space in the beginning of a statement within a block.

Q.14.By default, Python names the segment with top-level statements as _____main______.
a)True
b)False

Show Answer
a)True

Q.15 A function that returns a value is called as _____________ .

a)Fruitful function
b)non-fruitful function
c)void function
d)Non – void function

Show Answer
a)Fruitful function

Q.16. A function that doesnot returns a value is called as _____________ .

a)Fruitful function
b)non-fruitful function
c)void function
d)Non – void function

Show Answer
c)void function

Q.17.A void function internally returns legal empty value _______ .
a)None
b)Number
c)Alphabet
d)decimal

Show Answer
a)None

Q.18. Which of the following is a built in function in python?
a)seed()
b)sqrt()
c)factorial()
d)print()

Show Answer
d)print()

Q.19. What is the output of the following function?

import math
abs(math.sqrt(25))

a)ERROR
b)-5
c)5
d)5.0

Show Answer
d)5.0

Q.20. which of the following functions accept integers as arguments?

a)ord()
b)min()
c)chr()
d)any()

Show Answer
c)chr()

Thanks for study the Function in Python, Important MCQ for Class 12 Computer Science exam.

Working with Functions Solutions Class 12 – CS Study

Leave a Comment

Your email address will not be published.