Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβperfect for learners of all ages.
Enroll to start learning
Youβve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take mock test.
Test your understanding with targeted questions related to the topic.
Question 1
Easy
Write a lambda function that doubles a given number.
π‘ Hint: Think about how you would multiply a number by 2.
Question 2
Easy
What does the following code return? list(map(lambda x: x + 1, [1, 2, 3]))
?
π‘ Hint: Consider what happens when you add 1 to each element.
Practice 4 more questions and get performance evaluation
Engage in quick quizzes to reinforce what you've learned and check your comprehension.
Question 1
What is the primary purpose of a lambda function in Python?
π‘ Hint: Remember, they are called 'anonymous' for a reason!
Question 2
True or False: Lambda functions can take multiple arguments.
π‘ Hint: Think about your previous examples with multiple inputs.
Solve and get performance evaluation
Push your limits with challenges.
Question 1
Create a lambda function that takes a list of strings and returns a list with only the strings that have more than 3 characters.
π‘ Hint: How do you measure the length of a string?
Question 2
Write a function using lambda to sort a list of tuples based on the second element and demonstrate it with a list of tuples (number, name)
.
π‘ Hint: Remember how to access tuple elements.
Challenge and get performance evaluation