摘要: n1 = input('请输入第一个数') n2 = input('请输入第二个数') sum = int(n1)+int(n2) print('两个数的总和是:{}'.format(sum)) celsius= float(input('请输入摄氏温度')) fahrenheit= celsius*1.8+32 print('%0.1f摄氏温度转为华氏温度为%0.1f'%(cels... 阅读全文
posted @ 2018-04-19 13:55 哝哝 阅读(281) 评论(0) 推荐(0) 编辑
摘要: names=['范丞丞','农农','坤坤'] scores=[95,100,85] d = {'范丞丞': 95, '农农': 100, '坤坤': 85} print(d['农农']) d['张艺兴 '] = 100 'Thomas' in d d.pop('农农') print(d) import turtle turtle.speed(10) colors =['pink... 阅读全文
posted @ 2018-06-04 15:43 哝哝 阅读(89) 评论(0) 推荐(0) 编辑
摘要: name1='李子' name2='郑子' classmates=['李子','郑j子','橘bb子',1] print(name1,classmates[-1],len(classmates)) classmates.append('ring') classmates.insert(1,'果子') print(classmates) classmates.pop() classmates.p... 阅读全文
posted @ 2018-05-28 16:12 哝哝 阅读(112) 评论(0) 推荐(0) 编辑
摘要: plainText=input('message:') for i in plainText: print(chr(ord(i)-3),end='') stuNum='201709090062' print('年级是:'+stuNum[0:4]) print('专业是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) stuNum='4406821... 阅读全文
posted @ 2018-05-21 15:57 哝哝 阅读(133) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.setup(600,400,0,0) turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') def mygoto(x,y): turtle.penup() turtle.goto(x,y) turtle.pendown() def dra... 阅读全文
posted @ 2018-05-14 16:54 哝哝 阅读(255) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.setup(600,400,0,0) turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') while True: turtle.forward(100) turtle.right(177) if abs(turtle.pos())<... 阅读全文
posted @ 2018-05-07 16:56 哝哝 阅读(466) 评论(0) 推荐(0) 编辑
摘要: myNum=9 print('猜字游戏练练玩\n') while True: guess=int(input('请输入一个数字 :')) if guessmyNum: print('猜小了') else: print('你终于猜对了') break import tur... 阅读全文
posted @ 2018-05-01 16:33 哝哝 阅读(291) 评论(0) 推荐(0) 编辑
摘要: while True: a=input('1:摄氏温度\n2:华氏温度\n3:退出\n') if a=='1': c=float(input('请输入摄氏温度')) f=(c*9/5)+32 print('{:.2f}摄氏温度转换华氏温度{:.2f}'.format(c,f)) elif a=='2 阅读全文
posted @ 2018-04-23 16:51 哝哝 阅读(165) 评论(0) 推荐(0) 编辑
摘要: ... 阅读全文
posted @ 2018-04-16 16:40 哝哝 阅读(153) 评论(0) 推荐(0) 编辑
摘要: hi, everyone. 阅读全文
posted @ 2018-04-16 15:59 哝哝 阅读(62) 评论(1) 推荐(0) 编辑