Skip to content
OtisamLMS
Computing

Computing · Quick practice · answer shown after each question

Python lists, functions and libraries

Question 1 of 10

Question 1 of 10

Explain three advantages of using functions in a program.

Question 2 of 10

Question 2 of 10

Write a Python program that stores five scores in a list and prints the total, the average and the highest score.

Question 3 of 10

Question 3 of 10

Explain what a list is in Python and how items are accessed, with an example.

Question 4 of 10

Question 4 of 10

A function must be defined before it is called.

Question 5 of 10

Question 5 of 10

The keyword that sends a value back from a function is ___.

Question 6 of 10

Question 6 of 10

What is printed by for name in ["Ama", "Kojo"]: print(name)?

Question 7 of 10

Question 7 of 10

What does len([4, 8, 15, 16]) return?

Question 8 of 10

Question 8 of 10

The Python keyword used to define a function is ___.

Question 9 of 10

Question 9 of 10

What does max([7, 3, 9, 1]) return?

Question 10 of 10

Question 10 of 10

A value passed into a function is called a

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