HackerRank【30 Days of Code——day03】

Day 3: Intro to Conditional Statements

import math
import os
import random
import re
import sys


def  conditional_statements(N):
    if N>=1 and N<=100:
        if(N%2) == 0:
            if(N>2 and N<5):
                print('Not Weird')
            elif(N>6 and N<=20):
                print('Weird')
            elif(N>20):
                print('Not Weird')
        else:
            print('Weird')
if __name__ == '__main__':
    N = int(input())
    conditional_statements(N)

 

posted @ 2019-07-22 12:11  乱世有歌舞  阅读(127)  评论(0编辑  收藏  举报