Refer to CBSE Class 12 Computer Science Working with Function in Python MCQs provided below available for download in Pdf. The MCQ Questions for Class 12 Computer Science with answers are aligned as per the latest syllabus and exam pattern suggested by CBSE, NCERT and KVS. Multiple Choice Questions for Working with Function in Python are an important part of exams for Class 12 Computer Science and if practiced properly can help you to improve your understanding and get higher marks. Refer to more Chapter-wise MCQs for CBSE Class 12 Computer Science and also download more latest study material for all subjects
MCQ for Class 12 Computer Science Working with Function in Python
Class 12 Computer Science students should refer to the following multiple-choice questions with answers for Working with Function in Python in Class 12.
Working with Function in Python MCQ Questions Class 12 Computer Science with Answers
Question. A variable declared outside all the functions in a python program, then mention the statements which are True in the context of the variable.
1) This variable will have global scope.
2) This variable will not be accessible from anywhere in the prog.
3) This variable will have a large lifetime than local variable.
4) This variable will be referred as Local variable.
a) Only 1&2
b) Only 1
c) Only 1&3
d) Only 3
Answer : C
Question. A function in python begins with which keyword?
a) void
b) return
c) int
d) Def
Answer : D
Question. If return statement is not used inside the function, the function will return:
a) None
b) 0
c) Null
d) Arbitary value
Answer : A
Question. In which part of memory does the system stores the parameter and local variables of function call?
a) heap
b) stack
c) Uninitialized data segment
d) None of the above
Answer : B
Question. ___________ are the arguments passed to a function in correct positional order.
a) Required arguments
b) Keyword arguments
c) Default arguments
d) Variable-length arguments
Answer : A
Question. Name the statement that sends back a value from a function
a) print
b) input
c) return
d) None
Answer : C
Question. What is the output of the expression: round(4.576)
a) 4.5
b) 5
c) 4
d) 4.6
Answer : B
Question. Which of the following functions does not throw an error?
a) ord()
b) ord(‘ ‘)
c) ord(”)
d) ord(“”)
Answer : B
Question. How are required arguments specified in the function heading?
a) identifier followed by an equal to sign and the default value
b) identifier followed by the default value within backticks (“)
c) identifier followed by the default value within square brackets ([ ])
d) identifier
Answer : A
Question. What is the value returned by
>>> math.floor(-3.4)
a) 3
b) -4
c) 4.0
d) 3.0
Answer : B
Question. What is the output of the code shown below?
import random
random.choice(2,3,4)
a) An integer other than 2, 3 and 4
b) Either 2, 3 or 4
c) Error
d) 3 only
Answer : B
Question. Which of the following statements are True out of the given below:
1) More than one value(s) can be returned by a function
2) The variable declared inside a function is a Global variable.
3) Once the function is defined , it may be called only once
4) A function is used by invoking it
a) 1 & 2
b) 1 & 4
c) 2 & 3
d) 2 & 4
Answer : B
Question. The function can be called in the program by writing function name followed by ____
a) [ ]
b) { }
c) ( )
d) None of the above
Answer : C
Question. .…………function will return the largest integer less than the given floating point number.
a) floor()
b) ceil()
c) sqrt()
d) CEIL()
Answer : A
Question. .……….. function can identify the whitespace in a given string.
a) Space( )
b) isspace( )
c) Isspace( )
d) is_space( )
Answer : B
Question. 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
Answer : D
Question. Which of the following is the use of id() function in python?
a) Id() returns the size of object.
b) Id() returns the identity of the object.
c) Both A and B
d) None of the above
Answer : B
Question. 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()
Answer : A
Question. What is a variable defined outside a function referred to as?
a) local variable
b) global variable
c) static Variable
d) automatic variable
Answer : B
Question. What is the output of the program given below:
import random
x = random.random()
y= random.randint(0,4)
print(int(x),”:”, y+int(x))
a) 0: 0
b) 2 : 4
c) 1: 6
d) 0 : 5
Answer : A
Question. What are the outcomes of the function shown below?
>>> x=3
>>>eval(‘x**2’)
a) Error
b) 1
c) 9
d) 6
Answer : C
Question. What is returned by
>>> math.ceil(3.4)?
a) 3
b) 4
c) 4.0
d) 3.0
Answer : B
Question. What is displayed on executing print(math.fabs(-3.4))?
a) -3.4
b) 3.4
c) 3
d) -3
Answer : B
Question. What is the output of the function shown below (random module has already been imported)?
>>>random.choice(‘sun’)
a) sun
b) u
c) either s, u or n
d) Error
Answer : C
Question. >>>def Interest(p,c,t=2,r=0.09):
return p*t*r
Considering the above defined function which of following function call are legal.
1) Interest(p=1000,c=5)
2) Interest(r=0.05,5000,3)
3) Interest(500,t=2,r=0.05)
4) Interest(c=4,r=0.12,p=5000)
a) 1 , 2 and 4
b) 2 & 3
c) 1 &4
d) 3 & 4
Answer : C
Question. The range(x) function will generate the series of numbers from :
a) Min to max
b) o to x-1
c) o to x
d) x
Answer : B
Question. What is called when a function is defined inside a class?
a) class
b) function
c) method
d) module
Answer : C
Question. Which of the following function headers is correct?
a) def fun(a = 2, b = 3, c)
b) def fun(a = 2, b, c = 3)
c) def fun(a, b = 2, c = 3)
d) def fun(a, b, c = 3, d)
Answer : C
Question. Which of the following will print the pi value defined in math module?
a) print(pi)
b) print(math.pi)
c) from math import pi
print(pi)
d) from math import pi
print(math.pi)
Answer : C
Question. What is the output of the program given below:
x=50
def func(x):
x=2
func(x)
print(‘x is now’,x)
a) x is now 50
b) x is now 2
c) x is now 100
d) Error
Answer : A
Question. What is the output of the functions shown below? >>>min(max(False,-3,-4), 2,7)
a) 2
b) False
c) -3
d) -4
Answer : B
Question. What is a variable defined inside a function referred to as?
a) A global variable
b) A volatile variable
c) A local variable
d) An automatic variable
Answer : C
Question. What is the value returned by
>>> math.floor(3.4)
a) 3
b) 4
c) 4.0
d) 3.0
Answer : A
Question. What is the value of x if x = math.sqrt(4)?
a) 2
b) 2.0
c) (2, -2)
d) (2.0, -2.0)
Answer : B
Question. Which type of elements are accepted by random.shuffle()?
a) strings
b) lists
c) tuples
d) integers
Answer : B
Question. The built-in function sin() belongs to which module:
a) random
b) pandas
c) math
d) numpy
Answer : C
Question. .………..function returns the absolute value.
a) Abs( )
b) abs( )
c) absolute( )
d) None of these
Answer : B
Question. What is a recursive function?
a) A function that calls other function.
b) A function which calls itself.
c) Both a and b
d) None of the above
Answer : B
Question. 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
Answer : B
Question. What is the output of the program given below:
def cal(a,b,c):
return a*3,b*3,c*3
val=cal(10,12,14)
print(type(val))
print(val)
a) [30, 24, 28]
b) [30,36,42]
c) [10, 20, 30]
d) [10,12,14]
Answer : B
Question. How many keyword arguments can be passed to a function in a single function call?
a) zero
b) one
c) zero or more
d) one or more
Answer : C
Question. To include the use of functions which are present in the random library, we must use the option:
a) import random
b) random.h
c) import.random
d) random.random
Answer : A
Question. …………..function returns the smallest integer greater than the given floating point number.
a) floor()
b) ceil()
c) sqrt()
d) CEIL()
Answer : B
Question. Consider the statement given below and answer the question:
>>>S=’My name is Ravindra’
Which statement will print “True” out of the given :
a) print(S.isspace( ))
b) print (s.isspace( ))
c) print(S[2].isspace)
d) print(S[2].isspace( ))
Answer : D
Question. 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():
Answer : C
Question. What is the output of the function shown below?
import math
abs(math.sqrt(25))
a) Error
b) -5
c) 5
d) 5.0
Answer : D
Question. What is returned by
>>> math.ceil(-3.4)?
a) 3
b) 4
c) 4.0
d) -3
Answer : D
Question. What will be the output of the following code:
A=1
def f ():
A=10
print(A)
a) 1
b) 10
c) Error
d) None
Answer : A
Question. Which one of the following is incorrect?
a) The variables used inside function are called local variables.
b) The local variables of a particular function can be used inside other functions, but these cannot be used in global space
c) The variables used outside function are called global variables
d) In order to change the value of global variable inside function, keyword global is used.
Answer : B
Question. What is the output of below program?
def say(message, times = 1):
print(message * times , end =’ ‘)
say(‘Hello and’)
say(‘World’, 5)
a) Hello and WorldWorldWorldWorldWorld
b) Hello and World 5
c) Hello and World,World,World,World,World
d) Hello and HelloHelloHelloHelloHello
Answer : A
Question. What is output of print(math.pow(3, 2))?
a) 9
b) 9.0
c) None
d) None of these
Answer : B
Question. What is the output of the function shown below if the random module has already been imported?
>>>import random
>>>random.randint(3.5,7)
a) Error
b) Any integer between 3.5 and 7, including 7
c) Any integer between 3.5 and 7, excluding 7
d) The integer closest to the mean of 3.5 and 7
Answer : B
Question. .………..function returns the length of the object being passed.
a) Length()
b) Len()
c) len()
d) count()
Answer : C
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs |
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set A |
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set B |
CBSE Class 12 Computer Science Computer Hardware MCQs |
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set A |
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set B |
CBSE Class 12 Computer Science Data Structure MCQs |
CBSE Class 12 Computer Science Database Management System MCQs |
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs |
CBSE Class 12 Computer Science Exception Handling In Java MCQs |
CBSE Class 12 Computer Science File Handling MCQs Set A |
CBSE Class 12 Computer Science File Handling MCQs Set B |
CBSE Class 12 Computer Science File System MCQs Set A |
CBSE Class 12 Computer Science File System MCQs Set B |
CBSE Class 12 Computer Science Flow of control conditional statements MCQs |
CBSE Class 12 Computer Science For Loop in Python MCQs |
CBSE Class 12 Computer Science Fundamentals of Computer MCQs |
CBSE Class 12 Computer Science Introduction To E Commerce MCQs |
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set A |
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set B |
CBSE Class 12 Computer Science Java Basics MCQs Set A |
CBSE Class 12 Computer Science Java Basics MCQs Set B |
CBSE Class 12 Computer Science Object Oriented Concepts MCQs |
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set A |
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set B |
CBSE Class 12 Computer Science Working with Function in Python MCQs |
MCQs for Working with Function in Python Computer Science Class 12
Expert teachers of studiestoday have referred to NCERT book for Class 12 Computer Science to develop the Computer Science Class 12 MCQs. If you download MCQs with answers for the above chapter you will get higher and better marks in Class 12 test and exams in the current year as you will be able to have stronger understanding of all concepts. Daily Multiple Choice Questions practice of Computer Science will help students to have stronger understanding of all concepts and also make them expert on all critical topics. After solving the questions given in the MCQs which have been developed as per latest books also refer to the NCERT solutions for Class 12 Computer Science. We have also provided lot of MCQ questions for Class 12 Computer Science so that you can solve questions relating to all topics given in each chapter. After solving these you should also refer to Class 12 Computer Science MCQ Test for the same chapter.
You can download the CBSE MCQs for Class 12 Computer Science Working with Function in Python for latest session from StudiesToday.com
Yes, the MCQs issued by CBSE for Class 12 Computer Science Working with Function in Python have been made available here for latest academic session
You can find CBSE Class 12 Computer Science Working with Function in Python MCQs on educational websites like studiestoday.com, online tutoring platforms, and in sample question papers provided on this website.
To prepare for Working with Function in Python MCQs, refer to the concepts links provided by our teachers and download sample papers for free.
Yes, there are many online resources that we have provided on studiestoday.com available such as practice worksheets, question papers, and online tests for learning MCQs for Class 12 Computer Science Working with Function in Python