1 Star 0 Fork 0

tachyonxue/python3.6_code

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ex11.py 454 Bytes
一键复制 编辑 原始数据 按行查看 历史
tachyonxue 提交于 2019-07-12 16:24 +08:00 . ex11
# end=' ' 的意思是告诉print不要用换行符结束这一行,用户直接输入值定义age变量
print("How odl are you?", end=' ')
age = input()
print("How tall are you?", end=' ')
height = input()
print("How much do you weight?", end=' ')
weight = input()
# 使用了格式化
print(f"So, you're {age} old, {height} tall and {weight} heavy.")
# 还可以这样写
print("他的年龄是{0},体重是{2},身高是{1}".format(age,height,weight))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/tachyonxue/python3.6_code.git
git@gitee.com:tachyonxue/python3.6_code.git
tachyonxue
python3.6_code
python3.6_code
master

搜索帮助