Using for loops and using the same techniques as the pyramid function, create a textsquare function that
Question:
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.
>>> textsquare("t",5)
ttttt
t t
t t
t t
ttttt
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 72% (18 reviews)
def textsquarechar size space ...View the full answer
Answered By
Deepak Pal
Hi there! Are you looking for a committed, reliable, and enthusiastic tutor? Well, teaching and learning are more of a second nature to me, having been raised by parents who are both teachers. I have done plenty of studying and lots of learning on many exciting and challenging topics. All these experiences have influenced my decision to take on the teaching role in various capacities. As a tutor, I am looking forward to getting to understand your needs and helping you achieve your academic goals. I'm highly flexible and contactable. I am available to work on short notice since I only prefer to work with very small and select groups of students. Areas of interest: Business, accounting, Project management, sociology, technology, computers, English, linguistics, media, philosophy, political science, statistics, data science, Excel, psychology, art, history, health education, gender studies, cultural studies, ethics, religion. I am also decent with math(s) & Programming. If you have a project you think I can take on, please feel welcome to invite me, and I'm going to check it out!
5.00+
1+ Reviews
10+ Question Solved
Related Book For
Introduction To Computing And Programming In Python A Multimedia Approach
ISBN: 9780134025544
4th Edition
Authors: Mark J. Guzdial, Barbara Ericson
Question Posted:
Students also viewed these Computer science questions
-
BACKGROUND You are an information analyst working for NEE. The company president has asked you to prepare a Quantitative analysis of financial, sales, and operations data to help determine which...
-
The use of information systems saves workers and businesses countless hours of tedious labor. Still, users of information systems often become frustrated with the system's inability to grasp simple...
-
In the last chapter you added and modified some tables for Kelly's Boutique. She would now like you to create, run, and print some select, parameter, and action queries. Make the following changes...
-
Terminology Key: Key Word List Describe Explain What to do In bulleted, numbered or paragraph form, provide a number of consecutive items-if paragraph form, use commas (,) to separate items In...
-
During an air-conditioning process, 900ft3/min of conditioned air at 65oF and 30 percent relative humidity is mixed adiabatically with 300ft3/min of outside air at 80oF and 90 percent relative...
-
Paul, a graduate student at the university, repeatedly sold his blood to a blood bank to pay for his tuition and books. Does the law of sales apply to these transactions?
-
With reference to Exercise 14.24, test for randomness with level 0.05 . Data From Exercise 14.24 14.24 The difference between the observed flux and the theo- retical value was observed at 20 points...
-
There are several important disclosure items to consider when auditing the purchasing process. Discuss what they are and why they are important.
-
George was working at a grocery store, ABC Grocery, on a beautiful Monday morning. As he was stocking some shelves, he saw his former high school enemy, Claire. She was shopping at the store. George...
-
ABC Ltd operates under ideal conditions of uncertainty. On January 1, 2020, ABC Ltd acquired an asset to be used in its operations. Its cash flows depend on the economic conditions. The asset will...
-
Create a function like the pyramid function that does the upside-down version. Your function invertedPyramid should also take an input character and print an inverted pyramid.
-
We fixed justvowels so that it works with lowercase or uppercase vowels. Fix notvowels so that it doesnt print out uppercase vowels. (Try it as it is in the chapter, and you will see that it does...
-
JTD Corporation issued $800,000 of 20-year, 12% bonds on January 1, 2006, when the market rate of interest was 10%. Interest is payable annually on December 31. Use the present values tables in...
-
What is a Rabbi Trust?
-
Why is Code Sec. 338 of limited interest today?
-
Which rival companies appear to be employing a broad low-cost strategy?
-
How does an acquiring corporation make a Code Sec. 338 election?
-
Describe the attributes of an attractive industry for a new venture.
-
Using your answers to MBA 2-3 and MBA 2-4, compare and comment on the operating results of Delta and Southwest.
-
Banner Company acquires an 80% interest in Roller Company for $640,000 cash on January 1, 2013. The NCI has a fair value of $160,000. Any excess of cost over book value is attributed to goodwill. To...
-
Write a program that consists of three classes, A, B, and C, such that B extends A and that C extends B. Each class should define an instance variable named x (that is, each has its own variable...
-
Explain the changes that would have to be made to the program of Code Fragment 3.8 so that it could perform the Caesar cipher for messages that are written in an alphabet-based language other than...
-
The removeFirst method of the SinglyLinkedList class includes a special case to reset the tail field to null when deleting the last node of a list (see lines 51 and 52 of Code Fragment 3.15). What...
-
A 0.012-kg bullet, traveling at 850 m/s, hits a 2-kg block of wood that is initially at rest, and goes straight through it. Assume that the final velocity of the bullet relative to the block is 400...
-
Assume that Iowa Co. will receive 1,200,000 Mexican pesos in 180 days. The Mexican interest rate is 3% over 180 days and the US rate is 2% over the same period. The spot rate for the Mexican peso is...
-
After watching the video from "The Big Bang Theory, describe what was occurring in the scene. What types of listening were demonstrated. How could this conversation be improved so that both parties...
Study smarter with the SolutionInn App