Diamond shape

In this lesson, we will use nested loops or the helping function, printASymbolKTimes(), to print filled and hollow shapes of diamond and crown patterns. Let’s first start with the shape of the filled diamond.

Exercise 1 (Warm-up): Filled diamond

We want the following shape:

Get hands-on with 1200+ tech skills courses.