• + 0 comments

    This code works well for all test cases' here the range function is used to solve the question. if name == 'main': n = int(input()) if(n % 2 != 0): print("Weird") elif n in range(2, 6): print("Not Weird") elif n in range(6, 21): print("Weird") else: print("Not Weird")