• + 0 comments

    Guys i need help. My code doesnt work with test case 7 and 3. There are numbers 18 and 20 which are supposed to be weird but they're not. my code:

    if name == 'main': n = float(input().strip()) if (n%2) != 0 : print("Weird") elif (n%2) == 0 and range(2, 5): print("Not Weird") elif (n%2) == 0 and range(6, 20) : print("Weird") elif (n%2) == 0 and n > 20: print("Not Weird") else: print("Error")