您的位置:首页 > 其它

VPS相关基础知识

2011-01-05 16:58 183 查看
#!/usr/bin/env python
# Filename: switch.py
# Author: zhangliang - z_liang90@126.com
# Last modified: 2014-02-26 10:53
# Description:
from __future__ import division
def arithMetic(x,oprator,y):
result = {
'+':x+y,
'-':x-y,
'*':x*y,
'/':x/y
}
return result.get(oprator)
x = input('x:')
y = input('y:')
oprator = raw_input('oprator:')
retval = arithMetic(x, oprator, y)
print '%d %s %d = %d' % (x, oprator, y, retval)


本文出自 “JUST DON'T GIVE UP!” 博客,请务必保留此出处http://zliang90.blog.51cto.com/3001993/1363642
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: