Question
Using Python, create a textsquare function using the same techniques as the pyramid function. The function will take in two values as input: the character
Using Python, create a textsquare function using the same techniques as the pyramid function. The function will take in two values as input: the character to use in making the square, and the size of the square in characters. The function will then print out a square of that many characters.
create a square of text using a character and size that you input into a Python function/method. What I understand about the size of a square is the length of the width or height, which are the same. A 4 inch square is 4 inches by 4 inches. By analogy, a size 4 character square would be 4 characters by 4 characters.
You need to define a method that accepts a character and the size of the square. Since this assignment does not state if this is a hollow square, I would create a filled square using the character. For example, given the character "+" and size 4, the output would be:
++++
++++
++++
++++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started