码迷,mamicode.com
首页 > 编程语言 > 详细

新的篇章--Python

时间:2016-11-19 11:59:49      阅读:256      评论:0      收藏:0      [点我收藏+]

标签:变量   print   学习   name   命令   小数   power   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)

新的篇章--Python

标签:变量   print   学习   name   命令   小数   power   python类   资料   

原文地址:http://www.cnblogs.com/Daniel-python/p/6080003.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!