Plz explain the task : | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

Plz explain the task :

The aim of this kata is to determine the number of sub-function calls made by an unknown function. You have to write a function named count_calls which: takes as parameter a function and its arguments (args, kwargs) calls the function returns a tuple containing: the number of function calls made inside it and inside all the sub-called functions recursively the function return value. NB: The call to the function itself is not counted. HINT: The sys module may come in handy. I read this kata 4 times and still didn't get what to do :< plz someone explain I'm not asking for an answer but I need an explanation for the task!

11th Jul 2021, 9:12 PM
Ailana
Ailana - avatar
1 Answer
0
(args and kwargs allow you to pass an unspecified number of arguments to a function, so when writing the function definition, you do not need to know how many arguments will be passed to your function. *args is used to send a non-keyworded variable length argument list to the function) this can maybe help you understand what do they need? cause i dont know how to explain it
11th Jul 2021, 9:38 PM
Jad Yahya
Jad Yahya - avatar