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.
Test your understanding with targeted questions related to the topic.
Question 1
Easy
What does the map
function do in Python?
π‘ Hint: Think about how you can transform the contents of a list.
Question 2
Easy
Example: What will be the output of list(map(lambda x: x + 1, [1, 2, 3]))
?
π‘ Hint: What happens to each element when you add 1?
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 output of list(filter(lambda x: x >= 10, [5, 10, 15, 8]))
?
π‘ Hint: Think about which numbers in the list are 10 or more.
Question 2
True or False: The map
function returns a list in Python 3.
π‘ Hint: Remember how Python 3 handles this compared to earlier versions.
Solve 1 more question and get performance evaluation
Push your limits with challenges.
Question 1
Write a function that returns all prime numbers less than 100 using filter
and a prime checking function with list comprehension.
π‘ Hint: Think about how to check for primalityβwhat condition must be satisfied?
Question 2
Modify the Pythagorean triple generator to avoid generating duplicates. Ensure x < y < z.
π‘ Hint: You need to adjust the ranges for y and z relative to x.
Challenge and get performance evaluation