# Likepython.py Copyright (c) Kari Laitinen # http://www.naturalprogramming.com # 2006-05-27 File created. # 2022-12-16 Converted to Python 3. # Python has the elif keyword for writing if ... else if ... # constructs. # The logical operators of Python are the keywords # and, or, and not. # Note that the character that will be read from the # keyboard is a single-character string. print( "\n Do you like the Python programming language?" \ "\n Please, answer Y or N : ", end="" ) character_from_keyboard = input() if character_from_keyboard == 'Y' or \ character_from_keyboard == 'y' : print( "\n That's nice to hear." ) elif character_from_keyboard == 'N' or \ character_from_keyboard == 'n' : print( "\n That is not so nice to hear. " \ "\n I hope you change your mind soon." ) else : print( "\n I do not understand \"%s\"." % character_from_keyboard )