The code I am trying to write must include a prompt from the user, and three separate strings. I am able to get the sorting function to work when I ask the user to input 3 words in the same prompt, but when I separate the inputs out, the sorting function is not working. I am very new to coding (first week), so I apologize if this is not clear.
I am supposed to be writing a series of Python statements that will prompt the user for three strings. Then, using an 'if' statement, print them in alphabetical order.
Here is the code I have so far: Might anyone have any suggestions?
Thank you!
word1 = input(str("Please enter a word of your choice:"))
word2 = input(str("please enter another word, but make sure the word does not start with the same letter:"))
word3 = input(str("Awesome! Ok, finally, enter one last word, again making sure not to use the same letter:"))
if (word1 == word2):
print("The words are the same")
else:
print("Nicely done, you read directions well!")
print("The words in alphabetical order are..")
What's next here? I can't find this info anywhere.