1 Star 0 Fork 0

shenjie/Python-first-Practice

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ch07_01_if.py 524 Bytes
一键复制 编辑 原始数据 按行查看 历史
Fei Wan 提交于 2017-02-03 15:00 . Create ch07_01_if.py
number = 23
guess = int(input('Enter an integer : '))
if guess == number:
print('Congratulations, bingo!') # New block starts here
print('(but you do not win any prizes!)') # New block ends here
elif guess < number:
print('No, it is a litter higher than that')
# you can do whatever you want in a block ...
else:
print('No, it is a letter lower than that')
# you must have guess > number to reach here
print('Done')
# That last statement is always executed, after the if statement is executed
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/afoye/Python-first-Practice.git
git@gitee.com:afoye/Python-first-Practice.git
afoye
Python-first-Practice
Python-first-Practice
master

搜索帮助