【Hacker Rank】03.Python If-Else
来源:互联网 发布:2017女主角网络海选 编辑:程序博客网 时间:2024/06/04 17:42
Code:
#!/bin/python# -*- coding:UTF-8 -*-import sysdef ifelse(): n = int(raw_input()) while 1 <= n <= 100: if n % 2 != 0: print 'Weird' break elif n % 2 == 0 and 2 <= n <= 5: print 'Not Weird' break elif n % 2 == 0 and 6 <= n <= 20: print 'Weird' break else: print 'Not Weird' breakif __name__ == "__main__": ifelse()
0 0
- 【Hacker Rank】03.Python If-Else
- 【Hacker Rank】05.Python: Division
- python if-else
- python if else单行
- python学习:if...else
- Python中的if-else
- python简单学习 if else
- Python if elif else语句
- 3.1 Python if else语句
- Python之初识if:else:
- 【Python-2.7】if-elif-else
- python条件判断 if else
- Python中的条件分支语句,if , else , else if
- 【Hacker Rank】01.Say "Hello, World!" With Python
- if, else if, else
- if else if else
- if (){}else if(){} else{}
- 【Hacker Rank】06.Loops
- gitHub使用简单介绍
- redis中 hash类型的操作命令
- 《机器学习&&深度学习》 视频课程资源百度云下载
- 服务器web性能测试之Locust
- 我的第一篇CSDN博客
- 【Hacker Rank】03.Python If-Else
- Nginx配置-访问权限
- Redis简介
- PHP---数组
- NoMethodError:undefined method to_ISO8601 for nil:NilClass
- (转)第一篇环境配置 & Hello World
- C++ -四种类型转换方式
- Android系统架构
- 第41届ACM国际大学生程序设计