We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
ifn%2!=0:print("Weird")# If n is even and in the inclusive range of 2 to 5, print Not Weirdelif(n%2==0)&(ninrange(2,7)):print("Not Weird")# If n is even and in the inclusive range of 6 to 20, print Weirdelif(n%2==0)&(ninrange(6,21)):print("Weird")# If n is even and greater than 20, print Not Weirdelif(n%2==0)&(n>20):print("Not Weird")
Cookie support is required to access HackerRank
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 →