gs gs109 Mapping Functions - Python Functional Programming Tools - Quiz No.1
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 Mapping 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.
odd=lambda x: bool(x%2) numbers=[n for n in range(10)] print(numbers) n=list() for i in numbers: if odd(i): continue else: break
f=lambda x:bool(x%2) print(f(20), f(21))
l=[1, -2, -3, 4, 5] def f1(x): return x<2 m1=filter(f1, l) print(list(m1))
l=[-2, 4] m=map(lambda x:x*2, l) print(m)
-4 16
l=[1, -2, -3, 4, 5] def f1(x): return x<-1 m1=map(f1, l) print(list(m1))
l=[1, 2, 3, 4, 5] m=map(lambda x:2**x, l) print(list(m))
l=[n for n in range(5)] f=lambda x:bool(x%2) print(f(3), f(1)) for i in range(len(l)): if f(l[i]): del l[i] print(i)
True True 1 2 Error
False False 1 2
True False 1 2 Error
False True 1 2
m=reduce(lambda x: x-3 in range(4, 10)) print(list(m))