ЁЯЪА Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

Functions

Question: 151 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдСрдмреНрдЬреЗрдХреНрдЯ рдХрд╛ рдбреЗрдЯрд╛ рдкреНрд░рдХрд╛рд░ рдХреНрдпрд╛ рд╣реИ?

What is the data type of following object ?

A = [5,?abc?,3.2,6]
A)
B)
C)
D)

Question: 152 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реИ?

What is the output of following code ?

A=[[1,2,3], [4,5,6], [7,8,9]] 
print(A[1][:])
A)
B)
C)
D)

Question: 153 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХреЛрдб рдХрд╛ рдкрд░рд┐рдгрд╛рдо рдХреНрдпрд╛ рд╣реИ ?

What will be the output for the following code ?

a = list(range(10)) 
del a[::2] for i in a: 
     i+=1 
print(a)
A)
B)
C)
D)

Question: 154 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдЫрджреНрдо рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛, рдЬрд╣рд╛рдВ ╩М XOR рдСрдкрд░реЗрд╢рди рдХрд╛ рдкреНрд░рддрд┐рдирд┐рдзрд┐рддреНрд╡ рдХрд░рддрд╛ рд╣реИ?

What will be the output of the following pseudocode, where ? represent XOR operation ?

Integer a, b, c 
Set b = 4, a = 3 
c = a ^ b 
Print c
A)
B)
C)
D)

Question: 155 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдлрд╝рдВрдХреНрд╢рди рдХрд╛ рд░рд┐рдЯрд░реНрди рдкреНрд░рдХрд╛рд░ рдХреНрдпрд╛ рд╣реИ?

What is the return type of following function ?

def func1():
    return "mnp",22
A)
B)
C)
D)

Question: 156 Report Error

Math.floor(0o10) рдХреНрдпрд╛ рд╣реИ?

What is math.floor(0o10)?

A)
B)
D)

Question: 157 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рдлрд╝рдВрдХреНрд╢рди рдкрд╛рдпрдерди рдореЗрдВ рдПрдХ рдЕрдВрддрд░реНрдирд┐рд╣рд┐рдд рдлрд╝рдВрдХреНрд╢рди рд╣реИ?

Which of the following functions is a built-in function in python ?

A)
B)
C)
D)

Question: 158 Report Error

Math.fact(6) рджреНрд╡рд╛рд░рд╛ рд▓реМрдЯрд╛рдпрд╛ рдЧрдпрд╛ рдорд╛рди рдХреНрдпрд╛ рд╣реИ?

What is the value returned by math.fact(6)?

A)
B)
C)
D)

Question: 159 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдлрд╝рдВрдХреНрд╢рди рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of the following Python function ?

Import math
abs (math.sqrt (961))
A)
B)
C)
D)

Question: 160 Report Error

print(math.factorial(4.5)) рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of print(math.factorial(4.5))?

A)
B)
C)
D)

Question: 161 Report Error

рд░реАрдбрд▓рд╛рдЗрдиреНрд╕ () рдореЗрдердб рд░рд┐рдЯрд░реНрди рдХрд░рддреА рд╣реИ __________

The readlines() method returns ____________

A)
B)
C)
D)

Question: 162 Report Error

рдУрдкрди () рдлрд╝рдВрдХреНрд╢рди рдПрдХ рдлрд╝рд╛рдЗрд▓ рдСрдмреНрдЬреЗрдХреНрдЯ рд▓реМрдЯрд╛рддрд╛ рд╣реИ рдЬрд┐рд╕реЗ ______________ рдХрд╣рд╛ рдЬрд╛рддрд╛ рд╣реИ

open( ) function returns a file object called ______________

A)
B)
C)
D)

Question: 163 Report Error

рдорд╛рдирдХ рдЗрдирдкреБрдЯ рд╕реЗ рдкрд╛рда рдХреА рдПрдХ рдкрдВрдХреНрддрд┐ рдХреЛ рдкрдврд╝рдиреЗ рдХреЗ рд▓рд┐рдП рдХреМрди рд╕реЗ рджреЛ рдЕрдВрддрд░реНрдирд┐рд░реНрдорд┐рдд рдХрд╛рд░реНрдп рд╣реИрдВ, рдЬреЛ рдбрд┐рдлрд╝реЙрд▓реНрдЯ рд░реВрдк рд╕реЗ рдХреАрдмреЛрд░реНрдб рд╕реЗ рдЖрддреЗ рд╣реИрдВ?

Which are the two built-in functions to read a line of text from standard input, which by default comes from the keyboard?

A)
B)
C)
D)

Question: 164 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХреЛрдб рд╕реЗ рдХрд┐рддрдиреЗ рдирдВрдмрд░ рдкреНрд░рд┐рдВрдЯ рд╣реЛрдВрдЧреЗ?

How many numbers will be printed by the following code ?

def fun(a, b):
       for x in range(a, b+1):
            if x%3==0:
                   print(x, end= "  ")
fun(100, 120)
A)
B)
C)
D)

Question: 165 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХреЛрдб рдХрд╛ рдкрд░рд┐рдгрд╛рдо рдХреНрдпрд╛ рд╣реИ ?

What is the output of the following code ?

def disp(*arg):
        for i in arg:
              print(i)
disp("Rajat", "20")
A)
B)
C)
D)

Question: 166 Report Error

рдирд┐рдореНрди рдХреЛрдб рд╕реНрдирд┐рдкреЗрдЯ рдХреНрдпрд╛ рдХрд░рддрд╛ рд╣реИ?

What does the following code snippet do?

x = 5
print(type(x))
A)
B)
C)
D)

Question: 167 Report Error

print() рдлрд╝рдВрдХреНрд╢рди рдореЗрдВ sep рдЖрд░реНрдЧреБрдореЗрдВрдЯ рдХреНрдпрд╛ рдХрд░рддрд╛ рд╣реИ?

What does the sep argument in the print() function do?

A)
B)
C)
D)

Question: 168 Report Error

рдЕрд╕реЗрдВрдмрд▓рд░ рдХрд╛ рдкреНрд░рд╛рдердорд┐рдХ рдХрд╛рд░реНрдп рдХреНрдпрд╛ рд╣реИ?

What is the primary function of an assembler?

A)
B)
C)
D)

Question: 169 Report Error

рдкрд╛рдпрдерди рдореЗрдВ input() рдлрд╝рдВрдХреНрд╢рди рдХрд╛ рдЙрджреНрджреЗрд╢реНрдп рдХреНрдпрд╛ рд╣реИ?

What is the purpose of the input() function in Python?

A)
B)
C)
D)

Question: 170 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдЫрджреНрдо рдХреЛрдб рдХреНрдпрд╛ рдХрд░рддрд╛ рд╣реИ: READ num1, num2 SET multi to num1*num2 WRITE multi?

What does the following pseudocode do: READ num1, num2 SET multi to num1*num2 WRITE multi?

A)
B)
C)
D)

Question: 171 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рдирдВрдмрд░ рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХреЛрдб рджреНрд╡рд╛рд░рд╛ рдХрднреА рднреА рдЙрддреНрдкрдиреНрди рдирд╣реАрдВ рдХрд┐рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ:

Which of the following number can never be generated by the following code :

random.randrange(0, 50)
A)
B)
C)
D)

Question: 172 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдлрд╝рдВрдХреНрд╢рди рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛, рдпрд╣ рдорд╛рдирддреЗ рд╣реБрдП рдХрд┐ рдпрд╛рджреГрдЪреНрдЫрд┐рдХ рдореЙрдбреНрдпреВрд▓ рдкрд╣рд▓реЗ рд╣реА рдЖрдпрд╛рдд рдХрд┐рдпрд╛ рдЬрд╛ рдЪреБрдХрд╛ рд╣реИ?

What will be the output of the following Python function, assuming that the random module has already been imported?

random.uniform(3,4)
A)
B)
C)
D)

Question: 173 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдпрд╛ рддреЛ 1 рдпрд╛ 2 рд╣реИред

The output of the following Python code is either 1 or 2.

import random
random.randint(1,2)
A)
B)

Question: 174 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХреЛрдб рд╕реЗ рдХрд┐рддрдиреЗ рдирдВрдмрд░ рдкреНрд░рд┐рдВрдЯ рд╣реЛрдВрдЧреЗ?

How many numbers will be printed by the following code ?

def fun(a, b):
    for x in range(a, b + 1):
        if x % 3 == 0:
            print(x, end=" ")
fun(100, 120)
A)
B)
C)
D)

Question: 175 Report Error

рдХрд┐рд╕реА рдлрд╝рдВрдХреНрд╢рди рдХреЗ рдкреНрд░реЛрдЯреЛрдЯрд╛рдЗрдк рдХрд╛ рдЕрд░реНрде рд╣реИ

Prototype of a function means

A)
B)
C)
D)

Question: 176 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкреНрд░реЛрдЧреНрд░рд╛рдо рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реИ?

What will be the output of the following Python program ?

def addItem(listParam):
       listParam += [1]
mylist = [1, 2, 3, 4]
addItem(mylist)
print(len(mylist))
A)
B)
C)
D)

Question: 177 Report Error

Python рдореЗрдВ рдХрд┐рд╕реА рдлрд╝рдВрдХреНрд╢рди рдХреЛ рдХреИрд╕реЗ рдШреЛрд╖рд┐рдд рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?

How is a function declared in Python ?

A)
B)
C)
D)

Question: 178 Report Error

рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реИ?

What is the output ?

def calc(x)
      r=2*x**2
      return r
print(calc(5))
A)
B)
C)
D)

Question: 179 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What is the output of the following code ?

def fun(a, b=6):
       a=a+b
       print(a)
fun(5, 4)
A)
B)
C)
D)

Question: 180 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What is the output of the following code ?

def disp(*arg):
       for i in arg:
             print(i)
disp(name="Rajat", age="20"
A)
B)
C)
D)

Question: 181 Report Error

рдкреНрд░реЛрдЧреНрд░рд╛рдорд░ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рдХреЗ рдЕрдиреБрд╕рд╛рд░ рдХрд┐рд╕реА рдХрд╛рд░реНрдп рдХреЛ рдкреНрд░рд╛рдкреНрдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдкрд░рд┐рднрд╛рд╖рд┐рдд рдлрд╝рдВрдХреНрд╢рди рдХреЛ __________ рдХрд╣рд╛ рдЬрд╛рддрд╛ рд╣реИред

Function defined to achieve some task as per the programmer?s requirement is called a __________.

A)
B)
C)
D)

Question: 182 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of the following ?

def iq(a, b):
       if(a==0):
               return b
       else:
               return iq(a-1, a+b)
print(iq(3, 6))
A)
B)
C)
D)

Question: 183 Report Error

рдХрд┐рд╕реА рдлрд╝рдВрдХреНрд╢рди рдХреЛ рджреЗрдЦрддреЗ рд╣реБрдП рдЬреЛ рдХреЛрдИ рдорд╛рди рдирд╣реАрдВ рд▓реМрдЯрд╛рддрд╛ рд╣реИ, рд╢реЗрд▓ рдкрд░ рдирд┐рд╖реНрдкрд╛рджрд┐рдд рд╣реЛрдиреЗ рдкрд░ рдХреМрди рд╕рд╛ рдорд╛рди рджрд┐рдЦрд╛рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?

Given a function that does not return any value, what value is shown when executed at the shell ?

A)
B)
C)
D)

Question: 184 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рдХрдерди рдЕрдВрддрд┐рдо рд░реВрдк рд╕реЗ рдирд┐рд╖реНрдкрд╛рджрд┐рдд рд╣реЛрдЧрд╛?

Which of the following statement will execute in last ?

def s(n1) :      #Statement 1
       print(n1)   #Statement 2
n2=4  #Statement 3
s(n2)   #Statement 4
A)
B)
C)
D)

Question: 185 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of the following Python code ?

x = 50
def func(x) :
       print(' x is ' , x )
x = 2
print( ' Changed local x to ' , x )
func( x )
print( ' x is now ' , x )
A)
B)
C)
D)

Question: 186 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рдХрд┐рд╕реА рдлрд╝рдВрдХреНрд╢рди рдХреЛ рдХреЙрд▓ рдХрд░рдиреЗ рдХрд╛ рд╕рд╣реА рддрд░реАрдХрд╛ рд╣реИ?

Which one of the following is the correct way of calling a function ?

A)
B)
C)
D)

Question: 187 Report Error

рдпрджрд┐ рдХрд┐рд╕реА рдлрд╝рдВрдХреНрд╢рди рдореЗрдВ рд░рд┐рдЯрд░реНрди рд╕реНрдЯреЗрдЯрдореЗрдВрдЯ рдирд╣реАрдВ рд╣реИ, рддреЛ рдирд┐рдореНрди рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рдлрд╝рдВрдХреНрд╢рди рд░рд┐рдЯрд░реНрди рдХрд░рддрд╛ рд╣реИ?

If a function does not have a return statement, which of the following does the function return ?

A)
B)
C)
D)

Question: 188 Report Error

рдкреНрд░реЛрдЧреНрд░рд╛рдо рдореЗрдВ рдлрд╝рдВрдХреНрд╢рди рдирд╛рдо рдХреЗ рдмрд╛рдж __________ рд▓рд┐рдЦрдХрд░ рдлрд╝рдВрдХреНрд╢рди рдХреЛ рдХреЙрд▓ рдХрд┐рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИред

The function can be called in the program by writing function name followed by __________.

A)
B)
C)
D)

Question: 189 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of the following Python code ?

def say(message, times = 1 ) :
        print(message * times )
say( 'Hello ')
say( ' World ' *5)
A)
B)
C)
D)

Question: 190 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of the following Python code ?

def sayHello() :
       print( " Hello World ! " )
sayHello()
sayHello()
A)
B)
C)
D)

Question: 191 Report Error

рдкрд╛рдпрдерди рдореЗрдВ рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХрд┐рд╕ рдлрд╝рдВрдХреНрд╢рди рдХрд╛ рдЙрдкрдпреЛрдЧ рд╣реЛрддрд╛ рд╣реИ?

Which of the following is the use of function in python ?

A)
B)
C)
D)

Question: 192 Report Error

рд╕рд╣реА рдлрд╝рдВрдХреНрд╢рди рд╣реЗрдбрд░ рдХреЛ рдкрд╣рдЪрд╛рдиреЗрдВ.

Identify the correct function header.

A)
B)
C)
D)

Question: 193 Report Error

Function рдХреЗ рд▓рд┐рдП рдХреМрди рд╕рд╛ рдХреАрд╡рд░реНрдб рдкреНрд░рдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?

Which keyword is used for function ?

A)
B)
C)
D)

Question: 194 Report Error

рдкреБрдирд░рд╛рд╡рд░реНрддреА рдХрд╛рд░реНрдп __________ рд╣реИред

Recursive function is __________.

A)
B)
C)
D)

Question: 195 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of the following Python code ?

def display(b, n) :
       while n>0 :
             print(b, end=" ")
             n=n-1
display('z' , 3)
A)
B)
C)
D)

Question: 196 Report Error

рдкрд╛рдпрдерди __________ рдирд╛рдордХ рдирд┐рд░реНрдорд╛рдг рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдХреЗ, рд░рдирдЯрд╛рдЗрдо рдкрд░ рдЕрдЬреНрдЮрд╛рдд рдХрд╛рд░реНрдпреЛрдВ рдХреЗ рдирд┐рд░реНрдорд╛рдг рдХрд╛ рд╕рдорд░реНрдерди рдХрд░рддрд╛ рд╣реИред

Python supports the creation of anonymous functions at runtime, using a construct called __________.

A)
B)
C)
D)

Question: 197 Report Error

fun1() рдХреА рд╕рд╣реА рдлрд╝рдВрдХреНрд╢рди рдШреЛрд╖рдгрд╛ рдЪреБрдиреЗрдВ рддрд╛рдХрд┐ рд╣рдо рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рджреЛ рдлрд╝рдВрдХреНрд╢рди рдХреЙрд▓ рдХреЛ рд╕рдлрд▓рддрд╛рдкреВрд░реНрд╡рдХ рдирд┐рд╖реНрдкрд╛рджрд┐рдд рдХрд░ рд╕рдХреЗрдВред

Choose the correct function declaration of fun1() so that we can execute the following two function calls successfully.

fun1(25, 75, 55) 
fun1(10, 20)
A)
B)
C)
D)

Question: 198 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдкрд╛рдпрдерди рдХреЛрдб рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of the following Python code ?

def power(x, y=2) :
        r=1
        for i in range(y) :
             r=r*x
         return r
print (power(3))
Print (power(3, 3))
A)
B)
C)
D)

Question: 199 Report Error

рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХрд╛ рдЖрдЙрдЯрдкреБрдЯ рдХреНрдпрд╛ рд╣реЛрдЧрд╛?

What will be the output of the following ?

import sys 
sys.stdout.write('Welcome\n') 
sys.stdout.write('All\n')
A)
B)
C)
D)

Question: 200 Report Error

os.getlogin() рдХреНрдпрд╛ рд▓реМрдЯрд╛рддрд╛ рд╣реИ?

What does os.getlogin() return ?

A)
B)
C)
D)

Latest Updates