Solution: Printing a Diamond Shape
Go over the implementation of printing the diamond shape by dry-running the complex pieces of code.
We'll cover the following...
We'll cover the following...
Courtney's version
Explanation
Courtney’s version uses print instead of puts to output the spaces. The print and puts statements are similar except puts outputs a newline character (indicating that the line has ended). Try replacing print in Courtney’s solution by puts ...