Sensei's Library, problem 155

Adapted from Beginner Exercise 155 · OpenContent License

All problems