HTMLify

python_if-else.py
Views: 164 | Author: djdj
if n % 2 != 0: # odd
    print("Weird")
if n % 2 == 0: # even 
    if 2 < n < 5:
        print("Not Weird")
    if 6 < n <= 20:
        print("Weird")
    if n > 20:
        print("Not Weird")

Comments