Skip to content
OtisamLMS
Computing

Computing · Quick practice · answer shown after each question

Python: functions, scope and modules

Question 1 of 10

Question 1 of 10

What is printed? def add(a, b=2): return a + b print(add(5))

Question 2 of 10

Question 2 of 10

What does math.sqrt(49) return?

Question 3 of 10

Question 3 of 10

A variable created inside a function is

Question 4 of 10

Question 4 of 10

A recursive function must have a

Question 5 of 10

Question 5 of 10

A function that calls itself is called

Question 6 of 10

Question 6 of 10

A recursive function without a base case may never stop.

Question 7 of 10

Question 7 of 10

A procedure is a subroutine that

Question 8 of 10

Question 8 of 10

Write a function that takes a list of marks and returns the average, and use it on [60, 75, 90].

Question 9 of 10

Question 9 of 10

The values passed into a function when it is called are called ___.

Question 10 of 10

Question 10 of 10

The condition that stops recursion is the ___ case.

Questions written by OtisamLMS in the style of the WASSCE. They are not WAEC past questions.