-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctions.py
More file actions
46 lines (24 loc) · 708 Bytes
/
Functions.py
File metadata and controls
46 lines (24 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
# coding: utf-8
# In[1]:
# function witout arguement and return void
def my_fun():
print("hello world")
my_fun()
# function with arguement and return void
def my_func_withparam(name):
print(name)
my_func_withparam("uzair")
def my_func_withparam_default(name = "UZAIR"):
print(name)
my_func_withparam_default()
my_name = my_func_withparam("Uzair")
print(type(my_name))
# it will return NoneType so the reutrn type of my_name is Void
# function with arguement and return Int
def add_two_number(num1,num2):
return num1+num2
addVal = add_two_number(2,4)
print(type(addVal))
# it will return Int so the reutrn type of addVal is Int
# In[ ]: