-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDap.py
More file actions
41 lines (27 loc) · 641 Bytes
/
Dap.py
File metadata and controls
41 lines (27 loc) · 641 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
# sqaure = [x**2 for x in range(1,11)]
# print(sqaure)
# l = [x for x in range(1,11)]
# print(l)
# odd = [n for n in range(1,11) if n %2 != 0]
# print(odd)
# odd = [n for n in range(1,40) if n %2 != 0]
# print(odd)
# l = [-1,-2,-3,0,1,2,3,4,5]
# positive = [x for x in l if x>0]
# print(positive)
# l = [1,2,3,4,5,6]
# n = len(l)
# l.sort()
# if n%2 == 0:
# mid1 = n // 2 -1
# mid2 = n// 2
# median = (l[mid1] + l[mid2]) /2
# else :
# mid = n // 2
# median = l[mid]
# print(median)
# n = list(range(1,11))
# def is_number(x):
# return True
# sqaure = list(map(lambda x: x ** 2, filter(is_number,n)))
# print(sqaure)