Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started