Sensei's Library, problem 2

Adapted from Beginner Exercise 2 · OpenContent License

All problems