-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
61 lines (43 loc) · 1.74 KB
/
test.py
File metadata and controls
61 lines (43 loc) · 1.74 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import maxmin as Mm
import lowerupperbound as Lu
#================ Feature : max/min element : Test start =======================#
'''
Test case to find minimum from different containers
'''
# Find and print minimum element from multiple containers
print(Mm.min_element([1,2,3,4],[-1,2,3,4],(9,-10)))
# Find minimum from multiple integer elements
a,b,c,d = 1,10,-1,5
print(Mm.min_element(a,b,c,d))
'''
Test case to find maximum from different containers
'''
# Find and print maximum element from multiple containers
print(Mm.max_element([1,2,3,4],[-1,2,3,4],(9,-10)))
# Find maximum from multiple integer elements
a,b,c,d = 1,10,-1,50
print(Mm.max_element(a,b,c,d))
'''
Test case to find minimum and maximum from different containers
'''
# Find and print minimum and maximum element from multiple containers
print(Mm.minmax_element([1,2,3,4],[-1,2,3,4],(9,-10)))
# Find minimum and maximum from multiple integer elements
a,b,c,d = 1,11,-7,15
print(Mm.minmax_element(a,b,c,d))
#================ Feature : lower/upper bounds : Test start =======================#
'''
Find lower and upper bounds of a given number in a given series
'''
#Find lower bound of a number from an empty container
print(Lu.lower_bound([],12))
#Find lower bound of a number from an container where all numbers are greater than the number
print(Lu.lower_bound([10,2,3,4,7,11],1))
# Find lower bound of a number when number itself is spresent in the list
print(Lu.lower_bound([1,2,3,90,4,7,11],11))
#Find lower bound
print(Lu.lower_bound([1,2,3,90,4,7,11],12))
# Find lower and upper bound of a number in the given list where number is present
print(Lu.lower_upper_bound([1,2,3,90,4,7,11],11))
# Find lower and upper bound of a number
print(Lu.lower_upper_bound([1,2,3,90,4,70,10],11))