Skip to content

Instantly share code, notes, and snippets.

@pknowledge
Last active September 8, 2018 20:36
Show Gist options
  • Save pknowledge/969967ba9e52abe3b763efcf75e2874b to your computer and use it in GitHub Desktop.
Save pknowledge/969967ba9e52abe3b763efcf75e2874b to your computer and use it in GitHub Desktop.
Python Functions
# Python Tutorial for Beginners - Functions
def sum(arg1, arg2):
if type(arg1) != type(arg2):
print("Please give the args of same type")
return
return (arg1 + arg2)
a = sum(15, 60)
print(a)
print(sum('Hello ', 'World'))
print(sum(15.647, 80.258))
print(sum("hello", 15))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment