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: 68% (19 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...
-
The 8/31 Cash in Bank account in the Arizona Companys ledger was $20,000. The following 8/31 reconciling items existed: Bank Service Charge $100 Outstanding Checks $400 Note Collection by bank $120...
-
What is an unknownunknown risk? Give an example of one. AppendixLO1
-
As seen in Problem 3.109, silicon carbide nanowires of diameter D = 15 nm can be grown onto a solid silicon carbide surface by carefully depositing droplets of catalyst liquid onto a flat silicon...
-
Markus Company's common stock sold for $2.00 per share at the end of this year. The company paid preferred stock dividends totaling $4,400 and a common stock dividend of $0.36 per share this year. It...
-
Efficiently implement a stack class using a singly linked list, with no header or tail nodes.
-
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...
-
Electronic copiers make copies by gluing black ink on paper, using static electricity. Heating and gluing the ink on the paper comprise the final stage of the copying process. The gluing power during...
-
At 3 1 st March, 2 0 2 3 , AB Ltd , had an Authorized Capital of K 3 5 , 0 0 0 divided into 1 0 , 0 0 0 7 . 5 % noncumulative per share being due on 3 0 th June, 1 9 6 4 . per share paid, the...
-
A Leadership and Workforce Development Perspective. The literature review should discuss the related literature, organized by topic or themes (not a list of sources). A literature review includes...
-
Critical Success Factors (CSF) are elements that are necessary for an organization or a project to attain its objectives. For example, Chief Executive support is a CSF for corporate sustainability...
-
Ultra Ceramic Products presented the following data for its operations for the month of October, 2020: Dept 1 Work in process, July t. 1(Conversion costs, 60%) 7,000 units Transferred to Dept 2 Work...
-
Choose a global organizational leader who demonstrated how a high level of ethical communication via social media technologies have worked best at building trust with virtual stakeholders. Identify a...
-
(a) What is the frequency of radiation whose wavelength is 0.86 nm? (b) What is the wavelength of radiation that has a frequency of 6.4 10 11 s -1 ? (c) Would the radiations in part (a) or part (b)...
-
According to a New York Times columnist, The estate tax affects a surprisingly small number of people. In 2003, . . . just 1.25 percent of all deaths resulted in taxable estates, with most of them...
-
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...
-
As the representative of the local accounting club, you have been asked by the dean to help her understand the costs of the different degrees offered at the school. You decide to use an...
-
Gallatin Carpet Cleaning has always charged a flat fee per hundred square feet of carpet cleaned. The current fee is $ 1 2 . 6 0 per hundred square feet. However, there is some question about whether...
-
Lindell, Inc. has 8% , $100 par value preferred stock outstanding. To earn 12% on an investment in this stock, you need to purchase the shares at a per share price of $66.67 77.30 Ivonne has bought...
Study smarter with the SolutionInn App