Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

its python For your code use one file. Defino and call all of the following functions 1. Define a void function that prints a string

image text in transcribed
its python
For your code use one file. Defino and call all of the following functions 1. Define a void function that prints a string given as parameter backwards, each character must be followed by a dot. Print in one line. Do not use recursive calling of your function Test your function 2. Define a void function printAddress. The function will accept a string as parameter. This string has the format of an address street address, city, province and postal code (items soparated by commas) 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 betwoen 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 1 Do not use the string method trime..... Call and test your function in a print statement. Test your function using the following arguments: a)" House b)" * Gust blanks) c)** (empty string) 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

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

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions