Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that gets a string from the user and assign it to a variable named prefixes. Then prompts the user to enter in

Write a program that gets a string from the user and assign it to a variable named prefixes. Then prompts the user to enter in a string for a variable called suffix. Create function called prefixNsuffix that will accept two parameters, and concatenate each letter in prefixes with the suffix. You program should remove any whitespace, Example Sample Input: prefixes = ertrTgdf tr suffix = own Sample Output: Letter Prefix & suffix -------------------------- E Eown R Rown T Town R Rown T Town G Gown D Down F Fown T Town R Rown Program Logic Shell def main(): # Get user input #print table header #call prefixNsuffix function #Define prefixNsuffix function def prefixNsuffix(pre,suf): #for each letter in prefixes concatenate it with the suffix # Call the main function. main()

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

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions

Question

LO4 Specify how to design a training program for adult learners.

Answered: 1 week ago