新的篇章--Python

  这周已经开始Python的学习了,感觉Python类似于Powershell, 但又有不同点。在此总结一下新学到的资料;

  • 简单的使用变量的方法:
name= input("input your name:")
age= int(input("input your age:")) #int代表数字 # %f代表小数点
job= input("input your job:")
# 可以使用''' '''作为大量命令的方案
msg ='''
-----------你好!%s
Name : %s
Age: %d
Job: %s
------End------
'''% (name, name, age, job) # 使用%作为多段变量,必须加在此处。
print(msg)

posted @ 2016-11-19 10:29  Daniel.lu  阅读(227)  评论(0编辑  收藏  举报