Given an integer, n
, perform the following conditional actions:
- If
n
is odd, printWeird
- If
n
is even and in the inclusive range of 2 to 5, printNot Weird
- If
n
is even and in the inclusive range of 6 to 20, printWeird
- If
n
is even and greater than 20, printNot Weird
A single line containing a positive integer, n
.
1 <= n <= 100
Print Weird�
if the number is weird; otherwise, print Not Weird
.
Sample Inputs
3
24
Sample Output
Weird
Not Weird
if __name__ == '__main__':
n = int(input().strip())
def weirdo(num):
if num % 2 != 0:
return "Weird"
else:
if 2 <= num <= 5:
return "Not Weird"
elif 6 <= num <= 20:
return "Weird"
elif num > 20:
return "Not Weird"
if __name__ == '__main__':
n = int(input().strip())
def odd(num):
if num % 2 != 0:
return "Weird"
else:
return even(num)
def even(num):
if 2 <= num <= 5:
return "Not Weird"
elif 6 <= num <= 20:
return "Weird"
elif num > 20:
return "Not Weird"
N = int(input())
print(odd(N))