16 lines
364 B
Python
16 lines
364 B
Python
def threshold_checker(threshold):
|
|
def check(value):
|
|
return threshold < value
|
|
|
|
return check
|
|
|
|
# Usage
|
|
greater_than_10 = threshold_checker(10)
|
|
print(greater_than_10(12))
|
|
print(greater_than_10(8))
|
|
print(greater_than_10(10))
|
|
|
|
greater_than_100 = threshold_checker(100)
|
|
print(greater_than_100(150))
|
|
print(greater_than_100(80))
|
|
print(greater_than_100(100)) |