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
3 Answers
0
Which error do you see? Can you post full code?
0
it says no output
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?