gs gs109 Python Functions - Python Function - Quiz No.3
gs gs109 Python Quiz
This quiz belongs to book/course code gs gs109 Python of gs organization. We have 134 quizzes available related to the book/course Python. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Python Functions. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 1: Python supports the creation of anonymous functions at runtime, using a construct called __________
lambda
pi
anonymous
none of the mentioned
Question 2: What will be the output of the following Python code?
y = 6 z = lambda x: x * y print z(8)
48
14
64
None of the mentioned
Question 3: What will be the output of the following Python code?
lamb = lambda x: x ** 3 print(lamb(5))
15
555
125
None of the mentioned
Question 5: Lambda is a statement.
True
False
Question 8: What will be the output of the following Python code?
def writer(): title = 'Sir' name = (lambda x:title + ' ' + x) return name who = writer() print(who('Arthur'))
Arthur Sir
Sir Arthur
Arthur
None of the mentioned
Question 9: What will be the output of the following Python code?
L = [lambda x: x ** 2, lambda x: x ** 3, lambda x: x ** 4] for f in L: print(f(3))
27 81 343
6 9 12
9 27 81
None of the mentioned
Question 10: 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)
9997
9999
9996
None of the mentioned