Unit 10 · Lesson 7
Build the idea
Start with the concept and its key vocabulary.
OCR ERL random(min, max) generates an integer including both endpoints. Python uses import random and random.randint(min, max), which is also inclusive. Store the generated result if it is needed more than once. Normal programs usually allow a fresh sequence; these exercises read a seed so their expected results remain repeatable and can be checked exactly.
A value selected unpredictably from a specified range.
A range that can produce both its minimum and maximum values.
A starting value that makes a pseudo-random sequence repeatable for testing.
Generated by an algorithm to behave like random data.