Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

Draft a proposal for a risk assessment exercise.

Answered: 1 week ago