You are given three numbers. Check if any of the numbers exist in the range from 10 to 20 (including 10 and 20).
input is
2
4
6
output should be
false
N1=int(input("Enter first number: "))
N2=int(input("Enter second number: "))
N3=int(input("Enter third number: "))
if N1 in range(10,20):
print(N1," is in the range of 10 and 20")
if N2 in range(10,20):
print(N2," is in the range of 10 and 20")
if N3 in range(10,20):
print(N3," is in the range of 10 and 20")
else:
print("false")
Comments
Leave a comment