摘要: # -*- coding:utf-8 -*- x = "there are %d type of people." % 10 #IndentationError: unexpected indent 格式没对齐 binary = "binary" do_not = "don't" y = "those who know %s and those who %s." % (binary,do_no... 阅读全文
posted @ 2016-11-14 14:35 听风呤 阅读(127) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf-8 -*- """my_name = 'tingfengyin' my_age = 35 # not a lie my_height = 74 #inches my_weight = 180 #lbs my_eyes = 'blue' my_teeth = 'white' my_hair = 'brown' print ("let's talk about %... 阅读全文
posted @ 2016-11-14 14:34 听风呤 阅读(140) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf-8 -*- #添加UTF-8编码 cars = 100 #变量cars有100辆 space_in_a_car = 4.0 #变量1辆车的空间可以容纳4个人 drives = 30# 变量司机有30名 passengers = 90 #乘客有90名 cars_not_driven = cars - drives #不开的车辆 cars_driven = ... 阅读全文
posted @ 2016-11-14 14:33 听风呤 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 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 ... 阅读全文
posted @ 2016-11-14 13:25 听风呤 阅读(136) 评论(0) 推荐(0) 编辑