Traceback error message?
Task Given an integer, , perform the following conditional actions: If n is odd, print Weird If n is even and in the inclusive range of 2 to 5, print Not Weird If n is even and in the inclusive range of 6 to 20, print Weird If n is even and greater than 20, print Not Weird N = int(input()) if N % 2 != 0: print("Weird") if N (range(2,5) % 2 == 0): print("Not Weird") Question: It will print the first "weird" okay. But then why do I keep getting an "Traceback (most recent call last): File "..\Playground\", line 4, in <module> if N (range[2,5,1] % 2 == 0): TypeError: 'type' object is not subscriptable" message? I've tried indenting differently, etc. but to no avail. Any ideas? Thanks for any help.