Sensei's Library, problem 4

Adapted from Beginner Exercise 4 · OpenContent License

All problems