
age = input("How old are you?")
height = input("How tall are you?")
weight = input("How much do you weight?")
print("So,you're {0} old,{1} tall and {2} heavy.".format(age,height,weight))
Python3好像没有raw_input了。所有都是规范的input()。
pythonista是ios的app,文件管理模式是怎样的我还不是很清楚。
在console里输入下面的代码
>>> import os
>>> os.getcwd()
'/private/var/mobile/Containers/Shared/AppGroup/831D6641-71AC-4894-8613-224A6F2BFE90/Pythonista3/Documents'
知道了pythonita当前工作目录
'/private/var/mobile/Containers/Shared/AppGroup/831D6641-71AC-4894-8613-224A6F2BFE90/Pythonista3/Documents'
这个当前工作路径也太长了。
以后工作路径需要用变量记住,要慢慢从Windows系统向ios的文件系统适应。
网友评论