I am making a simple mad libs program in python 3 where the user enters nouns and pronouns and the program should print the input from the user.
Here is my code:
print ("Welcome to Mad Libs. Please enter a word to fit in the empty space.")
proper_noun = input("One day _________ (Proper Noun)").lower()
ing_verb = input("Was __________ (Verb + ing) to the").lower()
noun1= input("to the _________ (Noun)").lower()
pronoun1 = input("On the way, _____________ (Pronoun)").lower()
noun2 = input("Saw a ________ (Noun).").lower
pronoun2 = input("This was a surprise so ________ (Pronoun)").lower()
verb2 = input("_________ (verb) quickly.").lower()
print ("One day " + proper_noun)
print ("Was " + ing_verb + " to the")
print (noun1 + ". " + "On the way,")
print (pronoun1 + " saw a " + noun2 + ".")
print ("This was a surprise")
print ("So " + pronoun2 + " " + verb2 + " quickly.")
Getting this error code: TypeError: Can't convert 'builtin_function_or_method' object to str implicitly
In this line:
print (pronoun1 + " saw a " + noun2 + ".")
Pretty unexpected for python, so I'm not quite sure what this error means and how to fix it, can someone explain this error code to me, please?
source
share