def add1():
c=a+b
print("sum is",c)
a=int(input("Enter a:"))
b=int(input("Enter b:"))
add1()
the program is about adding two numbers. and displaying result. I took a and b input from the user, and directly called the function without passing arguments. its working. Could you please explain why this is workig?
I'm also confused when to use arguments and when not?