Skip to content

Commit 4675190

Browse files
lesson6
1 parent 0e97426 commit 4675190

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

lesson6.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# function
2+
numbers = [1,2,3,4,5]
3+
# print(len(numbers))
4+
5+
# import math
6+
import math
7+
# num = int(input('Enter number to make square root'))
8+
# print('Answer of {} is : {} '.format(num,math.sqrt(num)))
9+
10+
# programmer defined functions
11+
# def ppt_function():
12+
# print('this is def function')
13+
14+
# ppt_function()
15+
16+
# add substract multiply and division
17+
def add(a,p):
18+
return print('added value is : ',a+p)
19+
20+
def substract(a,p):
21+
return print('subtracted value is : ',a-p)
22+
23+
def multiply(a,p):
24+
return print('multiply value is : ', a*p)
25+
26+
def division(a,p):
27+
return print('divided value is : ', a/p)
28+
29+
add(5,4)
30+
substract(5,4)
31+
multiply(5,4)
32+
division(5,4)
33+
print('Calculated')
34+

0 commit comments

Comments
 (0)