HR파이썬 Python If-Else

개요[ | ]

Python If-Else
해커랭크 Python
# 문제 비고
HR파이썬 Introduction e
1 HR파이썬 Say "Hello, World!" With Python
2 HR파이썬 Python If-Else
3 HR파이썬 Arithmetic Operators
4 HR파이썬 Python: Division
5 HR파이썬 Loops
6 HR파이썬 Write a function
7 HR파이썬 Print Function

#!/bin/python3
def is_weird(n):
    if( n%2 == 1 ): return True
    if( 2<=n and n<=5 ): return False
    if( 6<=n and n<=20 ): return True
    if( n>20 ): return False
    return True
N = int(input())
if( is_weird(N) ):
    print('Weird')
else:
    print('Not Weird')
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}