You are viewing a single comment's thread. Return to all comments →
I wrote this code in Python 2 and it works for all Test Cases except for Test Case #7
if __name__ == '__main__': n = int(input()) if n%2 == 1: print 'Weird' if n%2 == 0 and (n in range (2,5)): print 'Not Weird' if n%2 == 0 and (n in range (6,20)): print 'Weird' if n%2 == 0 and n > 20: print 'Not Weird'
What could cause the problem?
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 →
I wrote this code in Python 2 and it works for all Test Cases except for Test Case #7
What could cause the problem?