Solutions for Chapter 6

/cc @fabioyamate @laurocaetano
Both solutions are valid. This was the first way I thought so I stuck with it.