Solution: Printing a Triangle
Understand how to create a printed triangle shape in Ruby by using loops and string operations. This lesson guides you through incrementing counters and dynamically building the output for each line.
We'll cover the following...
We'll cover the following...
Courtney’s version
Explanation
Line 1: A variable
countis created and initialized with the value zero.Line 2: The
do...