계산기 코드
def plus(a,b):
return int(a+b);
def minus(a,b):
return int(a-b);
def divide(a,b):
return int(a/b)
def multiply(a,b):
return int(a*b)
def remainder(a,b):
return int(a%b)
def power(a,b):
return int(a**b)
print(plus(4,5))
print(minus(4,"6"))
a = int(input("숫자를입력하세요"))
b = int(input("숫자를 입력하세요"))
c= input("연산자 입력 >> + / - ** * % 종료:Q >> ")
c="" //초기화
while c.upper() != "Q":
if c == "+":
print(int(a+b))
break;
elif c == "-":
print(int(a-b))
break;
elif c == "":
print(int(ab))
break;
elif c == "":
print(int(ab))
break;
elif c == "/":
print(int(a/b))
break;
elif c == "%":
print(int(a%b))
break;
else:
print("wrong input")
break;