Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using python and JES! Question #1 Your tasks Each of the following problems is worth 10 points 1. Using for loops and using the same

using python and JES! Question #1

image text in transcribed

Your tasks Each of the following problems is worth 10 points 1. Using for loops and using the same techniques as the pyramid function (see p.49), 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. You must use a for loop in your function >>>textsquare("x", 5) 2. Write a function stringanalyzer that accepts a string as input, then prints out the vowels in that string and then prints the consonants in that string >>>stringanalyzer ("Hogwarts") oa Hgwrts * Keep in mind that characters can be both upper and lowercase * Make sure your characters are printed out as shown (i.e., not one per line) 3. You have written an essay for school, and it has to be at least five pages long. But your essay is only 4.5 pages long! You decide to use your new Python skills to make your essay longer by spacing out the letters. Write a function that takes a string and a number of spaces to insert between each character, then print out the resulting string >betteressay ("my long essay", 2) e S s y 4. Same problem as before, but you decide to use more of your new Python skills. You are going to increase the spaces between the words. Write a function that takes a string and a number of spaces to insert between each word, then print out the resulting string >>> betteressay("my long essay", 2) my long essay

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions