Loading...
Loading...
Loading...
A dashboard prints a small bar report in the shape of a right-angled triangle. Row 1 has one *, row 2 has two, and so on.
Given n, print n rows.
Example
Input
4
Output
* ** *** ****
Try the problem first. Open one hint at a time.
The outer loop picks the row number.
In Python, "*" * i gives i stars, so no inner loop is needed.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor