# Likepythons.py Copyright (c) Kari Laitinen # http://www.naturalprogramming.com # 2006-05-27 File created. # 2022-12-16 Converted to Python 3. # Programs Likejavas.java, likecpps.cpp, and Likecs.cs # demonstrate how switch-case constructs can be used in # the Java/C++/C# programming languages. # Python does not have the switch-case constructs. # Therefore, this program is the same as Likepython.py 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 )