Robot Name

From Exercism PythonMITOriginal pagePython1 class period1 exercise4 graded tests

README.md

Robot Name

Instructions

Manage robot factory settings.

When a robot comes off the factory floor, it has no name.

The first time you turn on a robot, a random name is generated in the format of two uppercase letters followed by three digits, such as RX837 or BC811.

Every once in a while we need to reset a robot to its factory settings, which means that its name gets wiped. The next time you ask, that robot will respond with a new random name.

The names must be random: they should not follow a predictable sequence. Using random names means a risk of collisions. Your solution must ensure that every existing robot has a unique name.

Open the 01 folder and edit main.py. Run Tests checks it.

For teachers

Robot Name

Students solve Exercism's “Robot Name” Python exercise in CS Room, with Exercism's own tests.

  • Time: 1 class period
  • Tests: 4, set up for you when you import the lesson