Use two for loops, one of them nested, to print the following 5x10 rectangle:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This is a lot like the prior problem. Experiment with the ranges on the loops to find exactly what the range count controls.
for i in range(10): for j in range(5): print("*", end=" ") print() |
Output:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |