Ai
1 Star 0 Fork 0

小学肄业/Python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ex6_ifesle.py 432 Bytes
一键复制 编辑 原始数据 按行查看 历史
小学肄业 提交于 2018-11-05 21:09 +08:00 . 基本使用
#if 条件 elif 条件:else:
#输入一个年龄用input()
# age = input("please input your age : ")
# print(type(age)) #age 是string类型,变量是根据你所输入的类型来确定
#将age强转成int型
age = int(input("please input your age : "))
# print(type(age))
#if con1 elseif con2: else:
if age > 18:
print("you can smoke!")
elif age == 21:
print("you can mermory")
else:
print("ok ok!")
####
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/nuc_five/Python.git
git@gitee.com:nuc_five/Python.git
nuc_five
Python
Python
master

搜索帮助