Sensei's Library, problem 39

Adapted from Beginner Exercise 39 · OpenContent License

All problems