ASSIGNMENT - 3 Elements in the Range
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 and 20).
Input
The first, second, and third lines of input are 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 1Sample Output 1
2 4 16
True
Sample Input 2Sample Output 2
2 4 6
False
a=int(input())
b=int(input())
c=int(input()) #all inputs given
d = 10<= a <=20 or 10 <= b <= 20 or 10 <= c <= 20 # Check for the conditons
print(d) # crack the code using by logical and int
Comments
Post a Comment