Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6. What is the output? exp = lambda x: x**3 print(exp(2)) Group of answer choices 6 222 8 None of the above 7. What is
6. What is the output?
exp = lambda x: x**3
print(exp(2))
Group of answer choices
- 6
- 222
- 8
- None of the above
7. What is the output?
x = [1, 2, 3, 4, 5]
for i in filter(lambda n: True if n%2==0 else False, x):
print(i)
Group of answer choices
- 1 2 3 4 5
- 1 3 5
- 2 4
- 5 4 3 2 1
8. What is the output?
x = ['mike', 'jackson', 'tom']
print(sorted(x, key = lambda e: len(e), reverse=True))
Group of answer choices
- ['jackson', 'mike', 'tom']
- ['mike', 'jackson', 'tom']
- ['tom', 'jackson', 'mike']
9. What is the output?
x = ['mike', 'jackson', 'tom']
for i in map(lambda e:len(e), x):
print(i)
Group of answer choices
- 3, 7, 4
- 4, 7, 3
- 'mike', 'jackson', 'tom'
- 'tom', jackson', 'mike'
10. What is the output?
[x**2 for x in range(5)]
Group of answer choices
- [0, 1, 2, 3, 4]
- [1, 2, 3, 4, 5]
- [0, 1, 4, 9, 16]
- [1, 4, 9, 16, 25]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started