- 博客(10)
- 收藏
- 关注
转载 列表的应用
names=['范丞丞','农农','坤坤'] scores=[95,100,85] d = {'范丞丞': 95, '农农': 100, '坤坤': 85} print(d['农农']) d['张艺兴 '] = 100 'Thomas' in d d.pop('农农') print(d) import turtle turtle.s...
2018-06-04 15:43:00
179
转载 文件操作
name1='李子' name2='郑子' classmates=['李子','郑j子','橘bb子',1] print(name1,classmates[-1],len(classmates)) classmates.append('ring') classmates.insert(1,'果子') print(classmates) classmates.pop(...
2018-05-28 16:12:00
136
转载 字符串及其操作;. 凯撒密码
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:]) ...
2018-05-21 15:57:00
395
转载 用turtle画一颗五角星
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.p...
2018-05-14 16:54:00
577
转载 while循环与 for循环,函数定义与调用
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 ...
2018-05-07 16:56:00
585
转载 程序执行流程:猜数字游戏;库的使用:turtle
myNum=9 print('猜字游戏练练玩\n') while True: guess=int(input('请输入一个数字 :')) if guess<myNum: print('猜大了') elif guess>myNum: print('猜小了') else: ...
2018-05-01 16:33:00
268
转载 条件语句,while循环语句:完整的温度转换程序
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': f=float(input(...
2018-04-23 16:51:00
430
转载 理解数据类型与数学运算:摄氏温度与华氏温度的相互转换
n1 = input('请输入第一个数') n2 = input('请输入第二个数') sum = int(n1)+int(n2) print('两个数的总和是:{}'.format(sum)) celsius= float(input('请输入摄氏温度')) fahrenheit= celsius*1.8+32 print('%0.1f摄氏温度转...
2018-04-19 13:55:00
293
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅