0

Can someone please explain why this doesn't work.

def get_input(): user_input=input().split() user_verb=user_input[0] if user_verb=="Attack": new_verb=return_dmg() user_noun=user_input[1] if user_noun in Nouns: new_noun=Nouns[user_noun] print(new_noun.new_verb()) goblin= Creature("goblin", 3,"A lowly grunt.") Nouns= {"goblin": goblin} this is most of it

14th Mar 2017, 5:26 PM
Eli Raymer
Eli Raymer - avatar
3 Answers
0
Which error do you see? Can you post full code?
14th Mar 2017, 5:35 PM
Stanislav Syarkevich
Stanislav Syarkevich - avatar
0
it says no output
14th Mar 2017, 5:36 PM
Eli Raymer
Eli Raymer - avatar
0
Do you mean, it is not printing nothing? print(new_noun.new_verb()) I guess it is because if user_noun in Nouns is False . Can you post all code?
14th Mar 2017, 5:40 PM
Stanislav Syarkevich
Stanislav Syarkevich - avatar