# Evenodd.py (c) Kari Laitinen # http://www.naturalprogramming.com # 2006-03-02 File created. # 2022-12-16 Converted to Python 3. # A comma at the end of a print statement specifies # that a newline should not be printed after the sentence. # Operator % is the remainder operator in Python. print( "\n This program can find out whether an integer" \ "\n is even or odd. Please, enter an integer: ", end="" ) integer_from_keyboard = int( input() ) if integer_from_keyboard % 2 == 0 : print( "\n %d is even." % integer_from_keyboard ) else : print( "\n %d is odd." % integer_from_keyboard )