【Python】Learn Python the hard way, ex29 if语句
来源:互联网 发布:爱果园团购 淘宝 编辑:程序博客网 时间:2024/06/05 22:43
people = 20cats = 30dogs = 15if people < cats: print "Too many cats! The world is doomed!"if people > cats: print "Not many cats! The world is saved!" if people < dogs: print "The world is drooled on!" if people > dogs: print "The world is dry!" dogs += 5if people >= dogs: print "People are greater than or equal to dogs." if people <= dogs: print "People are less than or equal to dogs." if people == dogs: print "People are dogs." """Test Result:Too many cats! The world is doomed!The world is dry!People are greater than or equal to dogs.People are less than or equal to dogs.People are dogs."""
0 0
- 【Python】Learn Python the hard way, ex29 if语句
- Learn Python The Hard Way
- Learn Python The Hard Way
- if 语句----习题29扩展练习。learn python the hard way.
- Learn Python The Hard Way学习(29) - 什么是If
- Learn Python The Hard Way学习(30) - Else和If
- 【Python】Learn Python the hard way, ex1 简单print语句
- Learn Python the Hard Way ex48
- 学《learn python the hard way》(3)
- learn python the hard way 的ex48
- Learn Python The Hard Way-Ecercise1~5
- Learn Python The Hard Way-Ecercise6~10
- Learn Python The Hard Way-Ecercise11~15
- Learn Python The Hard Way-Ecercise16~20
- Learn Python The Hard Way-Ecercise21~25
- Learn Python The Hard Way-Ecercise26~30
- Learn Python The Hard Way-Ecercise31~35
- Learn Python The Hard Way-Ecercise36~40
- 01-咖喱土豆鸡肉饭
- 组合优化问题求解方法GA-交叉算子的总结
- 一起talk C栗子吧(第五十六回:C语言实例--图的最短路径四)
- Linux使用dd命令备份大文件显示进度
- mysql报 2003-Can't connect to MySql server on 'localhost'10061错误
- 【Python】Learn Python the hard way, ex29 if语句
- checked exception 和 unchecked exception区别
- 堆排序算法剖析(基于Java)
- 图像数据分块matlab
- 在命令行下运行php代码 和 文件
- 设计模式--里氏替换原则
- 海量数据挖掘MMDS week3:社交网络之社区检测:基本技巧
- iframe有那些缺点
- R语言绘图基础