# Sums.py (c) Kari Laitinen # http://www.naturalprogramming.com # 2006-05-24 File created. # 2022-12-16 Converted to Python 3. # Note that Sum.py is a different program in the pythonfiles1 folder. def print_sum( first_integer_from_caller, second_integer_from_caller ) : calculated_sum = first_integer_from_caller + \ second_integer_from_caller print( "\n The sum of %d and %d is %d." % ( first_integer_from_caller, second_integer_from_caller, calculated_sum ) ) # The main program begins. print_sum( 555, 222 ) print( "\n As you can see, this program can print" \ "\n the sum of two integers. Please," \ "\n type in the first integer: ", end="" ) first_integer = int( input() ) print( "\n And now the second integer: ", end="" ) second_integer = int( input() ) print_sum( first_integer, second_integer )