Sensei's Library, problem 8

Adapted from Beginner Exercise 8 · OpenContent License

All problems