Elements in the range
You are given three numbers. Check if any of the numbers exist in the range from 10 to 20(including 10 to 20).
input
the first,second and third lines of inputs are the integers.
output
the output should be either True or False
Explanation
Given a = 2,b = 4,c = 16 , 16 is in the range between 10 and 20.
so the output should be True.
sample input 1
2
4
16
sample output 1
True
sample input 2
2
4
6
sample output 2
False
a = 13
b = 9
c = 12
d = a , b ,c
if a <= 10 or a >= 21:
print (False)
else:
print (True)
if b <= 10 or b >= 21:
print (False)
else:
print (True)
if c <= 10 or c >= 21:
print (False)
else:
print (True)
Comments
Leave a comment