ExamVeda
Login
Home
11
What does the *args syntax in a function definition mean?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
12
What is the purpose of using recursion in a function?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
13
What is the output of the following code:
def greet(name):
  print(f"Hello, {name}!")
greet("Alice")
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
14
What is the purpose of a function in Python?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
15
What is a variable defined outside a function referred to as?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
16
Where are the arguments received from the command line stored?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
17
What is the purpose of using the ** symbol in function argument unpacking?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
18
What will be the output of the following Python code?
def sum(*args):
   '''Function returns the sum 
   of all values'''
   r = 0
   for i in args:
      r += i
   return r
print sum.__doc__
print sum(1, 2, 3)
print sum(1, 2, 3, 4, 5)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
19
What will be the output of the following Python code?
min = (lambda x, y: x if x < y else y)
 min(101*99, 102*98)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
20
The nested list undergoes shallow copy even when the list as a whole undergoes deep copy.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board