python 3.x - why the print fucntion don't work? -
** why don't print methods work in function total? thx! **
def main(): firstage = int(input('enter age:')) secondage = int(input("enter best friend's age:")) def total(firstage,secondage): response = sums(firstage,secondage) print(response) def sums(num1, num2): result = int(num1 + num2) return result main()
because not calling total function inside main function
change main function add total function inside this
def main(): firstage = int(input('enter age:')) secondage = int(input("enter best friend's age:")) total(firstage,secondage)
Comments
Post a Comment