小编W. *_*med的帖子

TypeError:无法隐式地将'builtin_function_or_method'对象转换为str

我在python 3中制作了一个简单的疯狂libs程序,用户输入名词和代词,程序应打印出来自用户的输入.

这是我的代码:

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()
#Asks user to complete the mad libs

print ("One day " + proper_noun)
print …
Run Code Online (Sandbox Code Playgroud)

python string typeerror python-3.x

4
推荐指数
1
解决办法
5116
查看次数

标签 统计

python ×1

python-3.x ×1

string ×1

typeerror ×1