Skip to content

Free certificate

Python Programming Basics

10 questions, multiple choice. Score 8 or more and you can create a printable certificate with your name, today's date and a verification link. Everything happens in your browser; we store nothing.

Revise first

Every question comes from these free chapters. Read them, run the code in your browser, then take the check.

  1. Understanding Python
  2. Data types
  3. Operators
  4. NumPy
  5. Pandas
Question 1

1. What does this return?

type(3.0)
Question 2

2. Which of these containers is immutable (cannot be changed after it is created)?

Question 3

3. A Python dictionary stores…

Question 4

4. What does this return?

7 // 2
Question 5

5. What does this return?

7 % 2
Question 6

6. What does this return?

"a" in ["a", "b"]
Question 7

7. What does this return?

import numpy as np
np.array([1, 2, 3]) * 2
Question 8

8. What is the shape of this array?

np.zeros((2, 3)).shape
Question 9

9. Which pandas structure is a two-dimensional table with labelled rows and columns?

Question 10

10. With no argument, how many rows does df.head() show?

Pass mark: 8 of 10. Retry as often as you like.