我是一个新的python和一个小文本冒险,它一直进展到现在我正在实施一个剑系统,如果你有一定尺寸的剑,你可以杀死一定大小的怪物.我试图代码中的另一个怪物的遭遇和我已经编写了剑的东西,但我想与完成它else的if...elif...elif说法,即使我有它的右缩进还在说缩进预计我不知道这里做的是代码:
print ('you find a monster about 3/4 your size do you attack? Y/N')
yesnotwo=input()
if yesnotwo == 'Y':
if ssword == 'Y':
print ('armed with a small sword you charge the monster, you impale it before it can attack it has 50 gold')
gold += 50
print ('you now have ' + str(gold) + ' gold')
elif msword == 'Y':
print ('armed with a medium sword you charge the monster, you impale the monster before …Run Code Online (Sandbox Code Playgroud)