Practice Library

All MCQs

Browse exam-wise, subject-wise, and country-wise MCQs with explanations.

Medium

In `def mean(values):`, what is `values` called?

Choose an option to check your answer.

Easy

What does a `return` statement do inside a Python function?

Choose an option to check your answer.

Easy

What is the purpose of the `def` keyword in Python?

Choose an option to check your answer.

Medium

Which situation is best suited to a `while` loop?

Choose an option to check your answer.

Easy

What does the index `-1` select from a nonempty Python sequence?

Choose an option to check your answer.

Medium

If `x = [2, 4, 6, 8, 10]`, what is produced by `x[1:4]`?

Choose an option to check your answer.

Easy

If `values = [10, 20, 30, 40]`, what does `values[2]` return?

Choose an option to check your answer.

Easy

Which Python structure stores values using key-value associations?

Choose an option to check your answer.