会员
周边
新闻
博问
闪存
众包
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
王滢
博客园
首页
新随笔
联系
管理
订阅
05 2018 档案
文件操作,列表实例NiceHexSpiral
摘要:fr = open('88.txt',mode='r', encoding='utf-8') planincode = fr.read() print('明文:' + planincode) print('密文:',end='') for c in planincode: print(chr(ord(c)+3),end='') fr = open('88.txt',mode='r...
阅读全文
posted @
2018-05-30 21:22
王滢
阅读(189)
评论(0)
推荐(0)
字符串操作
摘要:stuNum = '201709090022' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) IDNo= '44000202199812010027' print('省市是:'+IDNo[0:2]) print('生日是:'+IDNo[-8:-4]) print('性别是:'+ID...
阅读全文
posted @
2018-05-23 21:18
王滢
阅读(179)
评论(0)
推荐(0)
函数定义与使用
摘要:stuNum = '201709080008' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) IDNo = '440105199505160425' print('性别是:'+IDNo[-2]) import turtle turtle.setup(600,400,0,0...
阅读全文
posted @
2018-05-16 20:53
王滢
阅读(216)
评论(0)
推荐(0)
for循环:用turtle画一颗五角星
摘要: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, ...
阅读全文
posted @
2018-05-09 20:56
王滢
阅读(274)
评论(0)
推荐(0)
程序执行流程/布尔类型与布尔:运算猜数字游戏;库的使用:turtle
摘要:import turtle import time turtle.fillcolor('red') turtle.begin_fill() turtle.forward(100) turtle.right(144) time.sleep(1) turtle.forward(100) turtle.right(144) time.sleep(1) turtle.forward(100) turt...
阅读全文
posted @
2018-05-02 21:38
王滢
阅读(306)
评论(0)
推荐(0)
公告