# coding=utf-8
# 简单计算器程序
def cmputer(cmd):
ops = ['+', '-', '**', '/', '%', '*']
for op in ops:
if op in cmd:
cmds = cmd.split(op)
cmds[0] = float(cmds[0])
cmds[1] = float(cmds[1])
if op == '+':
return sum(cmds)
if op == '-':
return (cmds[0] - cmds[1])
if op == '**':
return pow(cmds[0],cmds[1])
if op == '/':
return (cmds[0] / cmds[1])
if op == '%':
return (cmds[0] % cmds[1])
if op == '*':
return (cmd[0]*cmds[1])
cmd = raw_input('请输入需要计算的表达式: ')
print cmputer(cmd)