def print_6_stars():
my_string = ''
for i in range(0, 6):
my_string += ' *'
print(my_string)
- Write down what the output of the function
print_6_stars
is.
- Write a function
print_star_square
that calls print_6_stars
in a loop to produce the following output.
>>>python print_stars.py
* * * * * *
* * * * * *
* * * * * *
* * * * * *
* * * * * *
* * * * * *
- Rewrite the function
print_star_square
without using print_6_stars
.
- Note that there are two ways (at least) to get the above output, so just try doing both!