You are viewing a single comment's thread. Return to all comments →
Can some one please correct me. If I give input as 8 (or) 10, the output is 'NotWeird' instead of 'Weird'
n = int(input('Enter a number:')) if (n in range(2,6) or n in range(21,)) and (n%2==0): print('Not Weird') else: print('Weird')
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 →
Can some one please correct me. If I give input as 8 (or) 10, the output is 'NotWeird' instead of 'Weird'