mercredi 15 juillet 2020

I can't get the result when i give an input as "20", why? [duplicate]

The code must run 20 as "Weird" but when give this as an input, there is no output. The rest of the inputs work ok, but why 20 doesn't work i can't figure it out. There is no error on my compiler tho. (Vscode) What to do to solve this problem? Thank you.

import math
import os
import random
import re
import sys

n = int(input())

i = n % 2

if  i == 1:
    print("Weird")
elif i == 0 and n in range(2,5):
    print("Not Weird")
elif i == 0 and n in range(6,20):
    print("Weird")
elif i == 0 and n > 20:
    print("Not Weird")

Aucun commentaire:

Enregistrer un commentaire