Here's one way to solve it:
n = int(input())
if n % 2 != 0:
print("Weird")
elif n >= 2 and n <= 5:
print("Not Weird")
elif n >= 6 and n <= 20:
print("Weird")
else:
print("Not Weird")
We check odd first. If odd, print "Weird" and we're done. Otherwise N must be even, so we check the ranges. The final else catches even numbers greater than .
You could also nest if statements: first check odd/even, then within even, check ranges. Both approaches work.