← Edexcel GCSE

Random numbers: Edexcel GCSE practice

Using the random module. 4 questions in the style of the Edexcel GCSE exam.

Sample questions

After `import random`, which values can `random.randint(1, 6)` return?

  1. 1, 2, 3, 4 or 5
  2. Any whole number from 1 to 6 inclusive
  3. Any decimal number between 1 and 6
  4. 0, 1, 2, 3, 4, 5 or 6