Using for loops and using the same techniques as the pyramid function, create a textsquare function that takes in two values as input: the character to use in making the square, and the size of the square in characters. Then print out a square of that many characters. Using for loops and using the same techniques as the pyramid function, create a textsquare function that takes in two values as input: the character to use in making the square, and the size of the square in characters. Then print out a square of that many characters.
What will be an ideal response?
```
def textsquare(char, size):
space = " "
for index in range(size):
line = char+space*(size-2)+char
if index==0:
line= char*size
if index==size-1:
line= char*size
print line
```
You might also like to view...
Why is it not practical to use a fully meshed topology in a wired network that contains 10 or more PCs?
What will be an ideal response?
A well-tuned and repeatable test plan needs to be ________
A) memorized B) written C) organized D) acquired
Due care and due diligence require that an organization make a valid effort to protect others and continually maintain this level of effort, ensuring these actions are effective.
Answer the following statement true (T) or false (F)
You can easily save a document as a new document template.
Answer the following statement true (T) or false (F)