AttributeError: 'str' object has no attribute 'toLowerCase'
I am writing a program that asks you to enter 5 words (one at a time) and
then prints them out in reverse order. (I am using Python 3.3.2) Here is
what it should look like: http://s11.postimg.org/rayd8m3oj/Untitled.png
But instead it gives me this:
http://s10.postimg.org/c1p590vex/example.png
Here is my code:
fifth_word = input("Please enter your 1st word: ")
fifth_word = fifth_word.toLowerCase
fourth_word = input("Please enter your 2nd word: ")
fourth_word = fourth_word.toLowerCase
third_word = input("Please enter your 3rd word: ")
third_word = third_word.toLowerCase
second_word = input("Please enter your 4th word: ")
second_word = second_word.toLowerCase()
first_word = input("Please enter your 5th word: ")
first_word = first_word.capitalize()
print("The sentence is: " + first_word + second_word + third_word +
fourth_word + fifth_word)
Thanks in advance
No comments:
Post a Comment