Skip to content

Instantly share code, notes, and snippets.

@makwanadeepam
Created March 27, 2024 18:39
Show Gist options
  • Select an option

  • Save makwanadeepam/2203e514a84064fef833f6da0fe58409 to your computer and use it in GitHub Desktop.

Select an option

Save makwanadeepam/2203e514a84064fef833f6da0fe58409 to your computer and use it in GitHub Desktop.
# Parameter in definition, argument in function call
# No args + No return value
def printHello():
print("Hello")
printHello()
# args + no return value
def printHelloWithName(name):
print("Hello",name)
printHelloWithName("Deepam")
# Args + return value
def add5(num):
print(5+num)
add5(15)
# Args + return value
def pythagoras(x,y):
return (x**2+y**2)**(1/2)
z=pythagoras(3,4)
print(z)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment