Question: in python language 1. Define a void function that prints each character of a string given as parameter, followed by a blank. Use a for

in python languagein python language 1. Define a void function that prints each character

1. Define a void function that prints each character of a string given as parameter, followed by a blank. Use a for loop with a range or a while loop in your solution. Challenge: Print the characters of the string followed by a blank backwards (No recursion!) Test your function 2. Define of a void function printAddress. The function will accept one!) string as parameter. This string has the format of an address: street address, city, province and postal code (items separated by commas, but one string). For any address entered as argument, the function will print out the street address, the postal code with the city, and the province on a separate line. How to solve the problem: Use the string method find (...) to find the indices of the commas and then apply string slicing. The street address is the substring before the first comma. o the city is the substring between the first comma and the second comma. o the province and the postal code is the substring after the second comma. Call and test your function with your own address as argument. 3. Define a value-returning function trimBlanks with one string parameter. The function will remove all blanks at the beginning of any string given as parameter and return the changed string. Assume the string entered as parameter is not empty. Do not use the string method trim(...). Call and test your function in a print statement. Test your function using the following arguments: House" b)" (just blanks) c) house Challenge a) Also remove all blanks at the end of the string given as parameter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!