Answer:
D. The code that generates a random location each time.
Explanation:
An algorithm is a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
An algorithm is needed to get a random location.