# first defining a method requiring two parameters a,b to sum up def sum(a, b): # returning result of sum from parameters # that might be an integer in most cases return (a + b) # requesting two integers - may be type "float" could be more suitable for higher precision a = int(input('Enter 1st number: ')) b = int(input('Enter 2nd number: ')) # generating a formatted output. # as shown, method call represents an integer value print(f'Sum of {a} and {b} is {sum(a, b)}')