Write a program that prints the following patterns separately, one below the other each pattern separated from the next by one blank line. Use for loops to generate the patterns. All aster- isks (*) should be printed by a single statement of the form print '*', (which causes the asterisks to print side by side separated by a space). (Hint: The last two pat- terns require that each line begin
with an appropriate number of blanks.) Extra credit: Combine your code from the four separate problems into a single program that prints all four patterns side by side by making clever use of nested for loops. For all parts of this program—minimize the numbers of asterisks and spaces and the number of statements that print these characters.

```
# Prints patterns of asterisks.
for counter in range( 1, 12 ):
# prints counter asterisks on each line
for x in range( 1, counter ):
print "*",
print # prints a new line
print # print a blank line
for counter in range( 1, 12 ):
# prints 11 - counter asterisks on each line
for x in range ( 11, counter, -1 ):
print "*",
print # new line
for counter in range ( 1, 11 ):
# prints counter - 1 spaces on each line
for x in range ( 1, counter ):
print " ",
# prints 11 - counter asterisks on each line
for x in range ( 11, counter, -1 ):
print "*",
print
for counter in range ( 1, 12 ):
# prints 11 - counter spaces on each line
for x in range ( 11, counter, -1 ):
print " ",
# prints counter asterisks on each line
for x in range ( 1, counter ):
print "*",
print
```

You might also like to view...
Because of how a rootkit replaces operating system files, it can be difficult to remove a rootkit from a system.
Indicate whether the statement is true or false
Computer hardware devices need which of the following items to communicate with the computer?
A) drivers B) RAM C) cables D) video card
The three-step process for entering text or numbers in a cell is (1) ____________________; (2) ___________________; and (3) ____________________.
Fill in the blank(s) with the appropriate word(s).
Specify the steps needed for evaluating an SQL statement of the form
SELECT thing1 FROM thing2 WHERE thing3 GROUP BY thing4 HAVING thing5 ORDER BY thing6