python学习笔记之003.py
2017-08-10 23:04
519 查看
#!/usr/bin/env python
# coding=utf-8
# Created Time: 2017-08-07 10:14:13
# Modified Time: 2017-08-07 10:23:15
number = 23
guess = int(raw_input('Enter as integer : '))
if guess == number:
print 'Congratulations,you guessed it.' # New block starts here
print "(but you do not win any prizes!)" # New block ends here
elif guess < number:
print 'No,it is a little higher than that' # Another block
# You can do whatever you want in a block ...
else:
print 'No,it is a little lower than that'
# you must have guess > number to reach here
print 'Done'
# This last statement is always executed,after the if statement is executed
# coding=utf-8
# Created Time: 2017-08-07 10:14:13
# Modified Time: 2017-08-07 10:23:15
number = 23
guess = int(raw_input('Enter as integer : '))
if guess == number:
print 'Congratulations,you guessed it.' # New block starts here
print "(but you do not win any prizes!)" # New block ends here
elif guess < number:
print 'No,it is a little higher than that' # Another block
# You can do whatever you want in a block ...
else:
print 'No,it is a little lower than that'
# you must have guess > number to reach here
print 'Done'
# This last statement is always executed,after the if statement is executed
相关文章推荐
- python学习笔记之007.py
- python学习笔记之002.py
- pyalgotrade学习-安装-坑1---------python学习笔记33
- python数据结构学习笔记-2016-10-07-01-完善后的mydate.py
- python学习笔记之009.py
- python学习笔记之014.py
- python学习笔记之004.py
- 小甲鱼:Python学习笔记003_函数
- python学习笔记之019.py
- 廖雪峰Python教程 学习笔记3 hello.py
- Python学习笔记之__init__.py文件的作用
- python3学习笔记--003--写一个自定义的包
- 让你快速学习python基础笔记003(一起动手实践)
- python 学习笔记__init__.py
- python网络编程学习笔记(10):webpy框架
- 【零基础入门学习Python笔记003】插曲之变量和字符串|课习题答案
- python2学习笔记之py2exe使用
- python网络编程学习笔记(10):webpy框架
- Python学习笔记----把.py程序转化成.exe完美在windows上运行