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 practice test.
Test your understanding with targeted questions related to the topic.
Question 1
Easy
Define a function collect_numbers(*numbers)
using *args that returns the highest number from the input.
💡 Hint: Consider using the max function on the tuple.
Question 2
Easy
Create a function print_fruits(**kwargs)
that prints out each fruit's name and color.
💡 Hint: Use a for loop to iterate through kwargs.
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 *args
represent in a function declaration?
💡 Hint: Think about how many inputs you can pass.
Question 2
True or False: **kwargs
collects arguments into a list.
💡 Hint: Recall the data structure used.
Solve 1 more question and get performance evaluation
Push your limits with challenges.
Question 1
Write a function that accepts both args and *kwargs to accept various inputs, and print them in a formatted way.
💡 Hint: Use separate loops for args and kwargs.
Question 2
Design a function that calculates average scores from an arbitrary number of test scores passed, also allowing an optional keyword argument to provide extra information.
💡 Hint: Remember to handle the division and ensure no divide by zero errors.
Challenge and get performance evaluation