samedi 6 juillet 2019

I can't figure it out why it doesn't print after the line of code ( if 6 <= n <= 20 )

I am running this code . and when i put the input as 6 or greater it dosent print anything and also dont show any error . like it doesnt print anything on and after that if 6 <= n <= 20

i tried rewritng the code or bugs and i checked it througly many times .

#!/bin/python3

import math
import os
import random
import re
import sys



if __name__ == '__main__':
    n = int(input().strip())
    if n%2 == 0 :
        if 2 <= n <= 5:
            print("Not Weird")
    elif n%2 == 0:
        if 6 <= n <= 20 :
            print("Weird")
    elif n%2 == 0:
        if n > 20:
             print("Not Weird")
    else:
        print("Weird")

It doesnt show any error

Aucun commentaire:

Enregistrer un commentaire