You are viewing a single comment's thread. Return to all comments →
Instead of using a dictionary when we can just use a simple list
n=int(input().strip())
l=['Weird','Not Weird']
print(l[n%2==0 and (n in range(2,6) or n>20)])
Seems like cookies are disabled on this browser, please enable them to open this website
Python If-Else
You are viewing a single comment's thread. Return to all comments →
Instead of using a dictionary when we can just use a simple list
n=int(input().strip())
l=['Weird','Not Weird']
print(l[n%2==0 and (n in range(2,6) or n>20)])