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...
-
Explain how audit procedures should be linked to the identification of fraud risk indicators.
-
In the 1970s, Special Electric Company brokered the sale of crocidolite asbestos, which is the most toxic form of asbestos, to Johns- Manville Corporation. Special Electric never held possession of...
-
Lower-of-Cost-or-Market Sedato Company follows the practice of pricing its inventory at the lower-of-cost-or-market, on an individual-item basis. From the information above, determine the amount of...
-
Seri Minyak Bhd uses crude palm oil in producing its products. The company expected to use 200 tonnes of crude palm oil in July 2023 to meet the demand in the festival season. If the price of raw...
-
The placenta is a marvelous, but temporary, organ. Starting with a description of its formation, show how it is an intimate part of both fetal and maternal anatomy and physiology during the gestation...
-
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...
-
In a recent GSS, the responses about the number of hours daily spent watching TV for the five subjects who identified themselves as Buddhists were 0, 5, 0, 1, 2. a. Find the mean, standard deviation,...
-
The worst failure is one that results in the loss of life. When you're dealing with highly complex and dangerous projects like NASA, there's always a tremendous risk that needs to be tracked. On...
-
Can you compare and contrast your expectation and perception of art museums?. The museum is full of the artworks of Mr. Van Gogh; it is a four-story building that is very likely contemporary in style...
-
-Galactosidase (-gal) is a hydrolase enzyme that catalyzes the hydrolysis of -galactosides into monosaccharides. A 0.328 g sample of -galactosidase is dissolved in water to make 0.115 L of solution,...
-
Genpact is a global business consulting firm. Its more than 90,000 employees help the world's large corporations improve their business processes. The firm, which started as a division of General...
-
As Generals Construction moves into its 10th year, the company's future is promising. The company has continued to grow and profit, but the CEO has asked company leaders to examine expenses to ensure...
-
Define the present value of a single amount. What is the discount rate?
-
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...
-
what are the five force models that managers need to look in to so as to perform more than its competitors
-
1. What is the major objective of most pro-competitive laws? Do the laws generally accomplish this objective? Why or why not? 2. What types of problem do marketers experience as they interpret...
-
How can linear programming be used to allocate limited resources among competing production activities?
Study smarter with the SolutionInn App