From e1e4713a5d8c7c243312a51b711a7747aafa2a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EB=B2=94=EC=A7=84?= <wony5248@ajou.ac.kr> Date: Tue, 20 Nov 2018 13:17:58 +0900 Subject: [PATCH] Upload New File --- flow.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 flow.py diff --git a/flow.py b/flow.py new file mode 100644 index 0000000..512ad8e --- /dev/null +++ b/flow.py @@ -0,0 +1,39 @@ +a=3 +if a == 3: + print('삼') + print('三') + print('Three') +else: + print('삼이아님.') + +import sys + +print('\n\n수를 입력하세요 : ') +a = int(input()) + +if a == 0: # if not a: 와 동일한 코드 + print('0은 나눗셈에 이용할 수 없습니다.') + sys.exit(0) + +print('3 /', a, '=', 3/a) + +print('\n\n수를 입력하세요 : ') +a = int(input()) + +if a == 0 : + print('0은 나눗셈에 이용할 수 없습니다.') +else : + print('3 /', a, '=', 3/a) + + +print('\n\n수를 입력하세요 : ') +a = intinput() + +if(a.isnumeric()): + a=int(a) + if a == 0 : + print('0은 나눗셈에 이용할 수 없습니다.') + else : + print('3 /', a, '=', 3/a) + +else:print('숫자를 입력하세요') -- GitLab