Skip to content

Instantly share code, notes, and snippets.

@yunho0130
Created October 16, 2018 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yunho0130/1beaf946a775b3c3e140382cc6f16174 to your computer and use it in GitHub Desktop.
Save yunho0130/1beaf946a775b3c3e140382cc6f16174 to your computer and use it in GitHub Desktop.
2018-10-16
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 18 16:25:52 2018
@author: HDC_USER
"""
print "Multiple Calculator"
def continue_check():
print "Continue? 계속 하시겠습니까? "
answer = raw_input("Y/N: ")
if answer == "n":
condition = False
elif answer == "y":
pass
else:
print "wrong answer 값을 잘못입력하셨습니다. 계산을 계속합니다."
def operator_check(num1, num2):
operator = int(raw_input("1. 덧셈 2. 뺄셈 3. 곱셈 4. 나눗셈: "))
if operator == 1:
return num1+num2
elif operator == 2:
pass
elif operator == 3:
pass
elif operator == 4:
pass
else:
print "wrong answer 값을 잘못입력하셨습니다. 계산을 계속합니다."
condition = True
while condition:
print "Input variables"
num1 = int(raw_input("Input 1: "))
num2 = int(raw_input("Input 2: "))
# print int(num1)*int(num2)
print operator_check(num1, num2)
# continue_check()
# print "result: {}".format(int(input_val_1)*int(input_val_2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment