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
Define a simple square function in Python.
π‘ Hint: Think about multiplying the input by itself.
Question 2
Easy
Use map
to apply the square function to the list [1, 2, 3]. What does it return?
π‘ Hint: Consider the output based on squaring 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 does the map function do in Python?
π‘ Hint: Remember, map means to apply!
Question 2
True or False: List comprehensions require the use of both map and filter functions.
π‘ Hint: Think about how comprehensions simplify that process!
Solve 2 more questions and get performance evaluation
Push your limits with challenges.
Question 1
Create a function that computes the cubes of all odd numbers in a list and returns them using a list comprehension.
π‘ Hint: Use a condition that checks if the number is odd.
Question 2
How can you modify the triplet generation code to find only primitive Pythagorean triples?
π‘ Hint: What additional check might tell you if a set of numbers has no common divisors?
Challenge and get performance evaluation