Redus Russ

Generation

generate functionMon, 27 Feb 2023

A basic dialog story game based in the console with yes or no answers only

def yes_or_no(prompt): while True: answer = input(prompt + '(y/n)') if answer in ('y', 'ye', 'yes'): return True elif answer in ('n', 'no', 'nop', 'nope'): return False print('Please answer with y or n') yes_or_no('Are you hungry?')

Questions about programming?Chat with your personal AI assistant