Question: Following was the assignment Option #1: String Values in Reverse Order Assignment Instructions Write a Python function that will work on three strings. The function

Following was the assignment

Option #1: String Values in Reverse Order

Assignment Instructions

Write a Python function that will work on three strings. The function will return to the user a concatenation of the string values in reverse order. The function is to be called from the main program.

In the main program, prompt the user for the three strings and pass these values to the function.

My answer was:

def concateStrings(string1, string2, string3): return string3+" "+ string2+" "+string1 def main(): string1 = input("Enter string1: ") string2 = input("Enter string2: ") string3 = input("Enter string3: ") result = concateStrings(string1,string2,string3) print(result) main()

Got the following feedback with deduction

"The string reverse logic is missing- every word in the string needed to be reversed."

I don't know what I'm missing with my answer. The output shows what I was looking for. Can you help?

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!