摘要: 代码如下: 点击查看代码 # -*-coding:utf-8- -*- # 那是什么 tabby_cat = "\tI'm tabbed in." persian_cat = "I'm split \non a line." Backslash_cat = "I'm \\ a \\ cat." fa 阅读全文
posted @ 2022-10-05 03:51 TiramisuPS 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 点击查看代码 # -*-coding:utf-8- -*- # 打印,打印,打印 # Here's some new strange stuff, remember type it exactly. days = "Mon Tue Wed Thu Fri Sat Sun" months 阅读全文
posted @ 2022-10-05 03:49 TiramisuPS 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 点击查看代码 # -*-coding:utf-8- -*- # 打印,打印 formatter = "%r %r %r %r" print formatter % (1, 2, 3, 4) print formatter % ('one', 'two', 'three', 'four') 阅读全文
posted @ 2022-10-05 03:48 TiramisuPS 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 点击查看代码 # -*-coding:utf-8- -*- # 更多打印 print "Mary had a little lamb." print "Its fleefe was white as %s." % 'snow' print "And everywhere that Mar 阅读全文
posted @ 2022-10-05 03:46 TiramisuPS 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 点击查看代码 # -*-coding:utf-8- -*- # 字符串(string)和文本 x = "There are %d types of people." % 10 binary = "bianry" do_not = "don't" y = "Those who know % 阅读全文
posted @ 2022-10-05 03:45 TiramisuPS 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 点击查看代码 # -*-coding:utf-8- -*- # 更多的变量和打印 my_name = 'P.S' my_age = 28 my_height = 183 # cm my_weight = 100 # kg my_eyes = 'Black' my_teeth = 'Whi 阅读全文
posted @ 2022-10-05 03:43 TiramisuPS 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 点击查看代码 # -*-coding:utf-8- -*- # 变量和命名 cars = 100 # 100辆车 space_in_a_car = 4 # 每辆车四个位置 drivers = 30 # 30个司机 passengers = 90 # 90个乘客 cars_not_driv 阅读全文
posted @ 2022-10-05 03:42 TiramisuPS 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 点击查看代码 # -*-coding: utf-8- -*- print "中文示例" # + plus 加号 # - minus 减号 # / slash ÷ # * asterisk × # % percent 余数 # < less-than 小于 # > greater-than 阅读全文
posted @ 2022-10-05 03:40 TiramisuPS 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 点击查看代码 # -*-coding: utf-8 -*- # A comment, this is so you can read your program later. # Anything after the # is ignored by python. # 一个注释符,便于后续 阅读全文
posted @ 2022-10-05 03:36 TiramisuPS 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 代码如下 点击查看代码 #-*- coding:utf-8- -*- print "Hello World" print "Hello Again" print "I like typing this." print "This is fun." print "Yay! Printing." pri 阅读全文
posted @ 2022-10-05 03:30 TiramisuPS 阅读(18) 评论(0) 推荐(0) 编辑