Day 3: Intro to Conditional Statements

  • + 0 comments

    My solution is as follows:

    if __name__ == '__main__':
        N = int(input().strip())
        if N%2==1:
            print("Weird")
        elif N%2==0 and 2<=N<=5:
            print("Not Weird")
        elif N%2==0 and 6<=N<=20:
            print("Weird")
        elif N%2==0 and N>20:
            print("Not Weird")
        else:
            print("you entered the number out of constraint (1=<N=>100")