# 1. Tools from pathlib import Path def calculator(expr:str)->str: """(20*4)+15와 같은 간단한 산술 표현식을 계산합니다.""" allowed = set("0123456789+-*/().") expr = expr.replace(" ", "") if not expr or not set(expr) allowed: return "오류: 숫자와 +-*/().만 허용됩니다." try: return str(eval(expr)) except (SyntaxError, ZeroDivisionError) as e: ..