摘要: fr = open('ccc.txt',mode='r',encoding='utf-8') plaincode = fr.read() print('明文:' + plaincode) print('密文:',end='') for c in plaincode: print(chr(ord(c)+3),end='') import turtle colors=['yellow... 阅读全文
posted @ 2018-05-30 21:28 XGFather 阅读(89) 评论(0) 推荐(0) 编辑
摘要: id ='440508199907291717' area =id[0:6] birthday =id[6:14] sex =id[-2] print(area,birthday,sex) if (int(sex) %2 ==0): print('girl') else: print('boy') print('+') print(chr(9800)) print(... 阅读全文
posted @ 2018-05-23 21:15 XGFather 阅读(114) 评论(0) 推荐(0) 编辑
摘要: stuNum='201709080055' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) IDNo='440508199907291717' print('省市'+IDNo[0:2]) 阅读全文
posted @ 2018-05-16 21:41 XGFather 阅读(108) 评论(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 阅读全文
posted @ 2018-05-16 20:42 XGFather 阅读(146) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.right(144) turtle.forward(100) tu 阅读全文
posted @ 2018-05-09 20:41 XGFather 阅读(111) 评论(0) 推荐(0) 编辑
摘要: number = 10 while True: guess = int(input('输入一个数字\n')) if guess > number: input('比这个数大') elif guess < number: input('比这个数小') else: ... 阅读全文
posted @ 2018-05-02 21:09 XGFather 阅读(85) 评论(0) 推荐(0) 编辑
摘要: while True: a = input('摄氏转华氏按1 华氏转摄氏按2') if a == '1': #输入 c = input('请输入摄氏温度:') #计算 f = float(c)*9/5+32 #输出 print('{}摄氏度转华氏度为{}' .format(c,f)) elif a= 阅读全文
posted @ 2018-04-25 21:35 XGFather 阅读(120) 评论(1) 推荐(0) 编辑
摘要: a=input('请输入第一个数:') b=input('请输入第二个数:') sum2=int(a)+int(b) print('两个数的和是:{}'.format(sum2)) a=input('请输入华氏温度:') sum=int(a)*5/9+32 print('摄氏度:{}'.format(sum2)) 阅读全文
posted @ 2018-04-25 21:20 XGFather 阅读(63) 评论(0) 推荐(0) 编辑