2018年6月4日

摘要: 阅读全文
posted @ 2018-06-04 15:18 曾少昆 阅读(68) 评论(0) 推荐(0) 编辑

2018年5月28日

摘要: kk = open('plainText.txt',mode='r', encoding='utf-8') plainText = kk.read() print('明文:'+plainText) print('密文:',end='') for c in plainText: print(chr(ord(c)+3),end='') for c in plainText: p... 阅读全文
posted @ 2018-05-28 15:46 曾少昆 阅读(119) 评论(0) 推荐(0) 编辑

2018年5月21日

摘要: stuNum = '201709080032' print('年级是:'+stuNum[0:4]) print('专业编号是: '+stuNum[4:9]) print('序号是: '+stuNum[-3:]) stuNum = '441322199708070011' print('所在省市:'+stuNum[0:2]) print('所在地区:'+stuNum[2:4]) p... 阅读全文
posted @ 2018-05-21 15:41 曾少昆 阅读(143) 评论(0) 推荐(0) 编辑

2018年5月14日

摘要: import turtle while True: turtle.color("yellow") turtle.bgcolor('red') turtle.forward(100) turtle.right(132) if abs(turtle.pos())<1: break turtle.done() # author:yxb... 阅读全文
posted @ 2018-05-14 16:43 曾少昆 阅读(162) 评论(0) 推荐(0) 编辑
摘要: import turtle while True: turtle.color("yellow") turtle.bgcolor('red') turtle.forward(100) turtle.right(132) if abs(turtle.pos())<1: break turtle.done 阅读全文
posted @ 2018-05-14 15:28 曾少昆 阅读(92) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.penup() turtle.left(90) turtle.fd(200) turtle.pendown() turtle.right(90) turtle.fillcolor("red") turtle.begin_fill() turtle.circle(10, 180) turtle.circle(25, 110) turtle.lef... 阅读全文
posted @ 2018-05-14 15:18 曾少昆 阅读(156) 评论(0) 推荐(0) 编辑

2018年5月7日

摘要: 阅读全文
posted @ 2018-05-07 15:53 曾少昆 阅读(92) 评论(0) 推荐(0) 编辑

2018年4月23日

摘要: while True: a=input('1:摄氏转华氏\n2:华氏转摄氏\n3:退出\n') if a=='1': celsius=float(input('输入摄氏温度:')) fahrenheit=(celsius*9/5)+32 print('{:.2f}摄氏温度转华氏温度为{:.2f}\n 阅读全文
posted @ 2018-04-23 16:55 曾少昆 阅读(153) 评论(0) 推荐(0) 编辑
摘要: >>> a=input('请输入一个数字') 请输入一个数字777 >>> b=input('请输入另一个数') 请输入另一个数888 >>> sum1=int(a)+int(b) >>> print('二数之和是:{}'.format(sum1)) 二数之和是:1665 >>> a=input('请输入摄氏温度') 请输入摄氏温度56 >>> sum1=int(a)*9/5+32 >>> pr... 阅读全文
posted @ 2018-04-23 14:59 曾少昆 阅读(89) 评论(0) 推荐(0) 编辑

2018年4月16日

摘要: >>> name1=input('请输入第一个名字;') 请输入第一个名字;王皮蛋 >>> name2=input('请输入第二个名字;') 请输入第二个名字;陈独秀 >>> vehicle=input('请输入一种物品;') 请输入一种车子;炸弹 >>> print('刚看完电影的{}去跳伞{}发现伞上有{}'.format(name1,vehicle,name2)) 刚看完电影的王皮蛋去跳... 阅读全文
posted @ 2018-04-16 15:44 曾少昆 阅读(156) 评论(0) 推荐(0) 编辑