码迷,mamicode.com
首页 > 其他好文 > 详细

ex1 to ex3.py

时间:2016-11-14 15:22:57      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:utf-8 编码   ram   after   utf-8   run   pie   编码   can   highlight   

1 #_*_ coding: utf-8 _*_  #表示的是在脚本中使用unicode utf-8 编码
2 print ("hello world!")
3 print ("hello again")
4 print ("this is fun")
5 print ("yay! printing")
6 print ("i‘d much rather you ‘not‘")
7 print (i "said" do not touch this.)
 1 """# A comment,this is so you can read your program later
 2 # anything after the # is ignored by python
 3 
 4 print ("i could have code like this.") # and the commment after is ignored"""
 5 
 6 # you can also use a comment to "disable" or comment out a piece od code:
 7 #print "this won‘t run"
 8 
 9 print ("this will run")
10 print ("hi # here")
 1 # -*- coding: utf-8 -*- 
 2 """print ("i will now count chickens:")
 3 
 4 print ("hens",25+30/6)
 5 print ("roosters",100-25*3%4)
 6 
 7 print ("now i will count the eggs:")
 8 
 9 print (3+2+1-5+4%-1/4+6)
10 
11 print ("is it true that 3+2<5-7?")
12 
13 print (3 + 2  < 5 - 7)
14 
15 print ("what is 3 + 2?", 3+2)
16 
17 print ("what is 5 - 7?",5-7)
18 
19 print ("oh,that‘s why it‘s false")
20 
21 print ("how about some more.")
22 
23 print ("is it great?", 5 > -2)
24 print ("is it greater or equal?" ,5 >= -2)
25 print ("IS it less or equal ?", 5 <= -2)"""

 

  

ex1 to ex3.py

标签:utf-8 编码   ram   after   utf-8   run   pie   编码   can   highlight   

原文地址:http://www.cnblogs.com/jiangzhipeng/p/6061520.html

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