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
相关文章推荐
- 《Spring 3.x 企业应用开发实战》学习笔记 第三章 IoC容器概述 3.2 相关Java基础知识 类装载器 反射机制
- js-ajax相关基础知识整理
- c#基础知识4:dll相关
- JAVA相关基础知识总结(连载)
- Redis哨兵架构的相关基础知识的讲解
- 显示屏驱动相关的基础知识
- JAVA相关基础知识
- 数据库基础教程(3):相关理论知识
- Linux设备驱动程序——内存和I/O基础知识学习:(1)内核中相关基础知识学习
- UML的相关基础知识
- Android View滑动相关的基础知识点
- iOS蓝牙开发(一)蓝牙相关基础知识
- Android 基础知识面试相关总结
- Linux设备驱动程序——Linux设备驱动程序——内存和I/O基础知识学习:(2)内核中相关基础知识学习
- 【搜索引擎基础知识3】搜索引擎相关开源项目及网站
- JAVA相关基础知识
- Java相关基础知识(二)
- JAVA相关基础知识
- applicationContext.xml相关的基础小知识应用记录(事务管理)
- 单片机相关的基础知识