0

11

Try d code output was only you said" hello" and Eof error def get_input(): command = input(": ").split() verb_word = command[0] if verb_word in verb_dict: verb = verb_dict[verb_word] else: print("Unknown verb {}". format(verb_word)) return if len(command) >= 2: noun_word = command[1] print (verb(noun_word)) else: print(verb("nothing")) def say(noun): return 'You said "{}"'.format(noun) verb_dict = { "say": say, } while True: get_input() I mean the output of this code was bring Eof error

22nd Jun 2020, 1:11 AM
Oladeji
1 Réponse