Sensei's Library, problem 10

Adapted from Beginner Exercise 10 · OpenContent License

All problems