def add(num1, num2):
return num1 * num2
def main():
print(add(1,1))
print(add(2,4))
print(add(10,10))
main()
I dont understand why this code can get the two arguments from the main(). Can you call the function by print? Otherwise I can not figure out why it is working.
I try to use debugger but still dont understand. so hope to get the answer here, thanks!!
New contributor
koffman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.