Test yourself
Python Quiz
Answer the 12 questions below — you get instant feedback on each. Your best score is saved on this device.
1Which function displays output on the screen in Python?
2How do you write a single-line comment in Python?
3Which of these creates a list?
4What does the len() function return for "Hello"?
5Which keyword defines a function in Python?
6What is the result of 2 ** 3?
7Which data type is the value 3.14?
8What does the % operator return?
9Which function converts a string to a whole number?
10What index does the first item of a list have?
11Which keyword starts a conditional statement?
12How do you loop over each item in a list called items?