会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
hhxhjy
博客园
首页
新随笔
联系
订阅
管理
2022年6月14日
实验八
摘要: def main(): passif __name__ == '__main__': main()from turtle import*def square(size=50,rgb='pink'): pencolor(rgb) for i in range(4): fd(size) left(90)
阅读全文
posted @ 2022-06-14 00:24 黄海祥
阅读(26)
评论(1)
推荐(0)
2022年6月7日
实验七
摘要: class User: def __init__(self,name='guest',password=111111,status=1): self.name=name self.password=password self.status=status def info(self): print('
阅读全文
posted @ 2022-06-07 22:40 黄海祥
阅读(26)
评论(2)
推荐(0)
2022年5月22日
实验6
摘要: def main(): passif __name__ == '__main__': main()def is_valid(x): if len(x)==18 and (x.isdigit() or x[-1]=='X'): return Truem=[]with open('data3_id.tx
阅读全文
posted @ 2022-05-22 23:41 黄海祥
阅读(21)
评论(2)
推荐(0)
2022年5月16日
实验五
摘要: task3def main(): passif __name__ == '__main__': main()with open('data3.txt','r')as f: data=f.read().split('\n')del data[0]a=list(data)b,m=[],[]for i i
阅读全文
posted @ 2022-05-16 22:53 黄海祥
阅读(22)
评论(3)
推荐(0)
2022年5月10日
实验四 黄海祥
摘要: task1.py print(sum) sum = 42 print(sum) def inc(n): sum = n+1 print(sum) return sum sum = inc(7) + inc(7) print(sum) line3余line11为同一变量,line1为未确定变量,作用域
阅读全文
posted @ 2022-05-10 21:39 黄海祥
阅读(45)
评论(2)
推荐(0)
2022年4月26日
实验三黄海祥
摘要: 1 import random 2 print('用列表存储随机整数: ') 3 ls = [random.randint(1, 100) for i in range(5)] 4 print(ls) 5 print('\n用集合存储随机整数: ') 6 7 s1 = {random.randint
阅读全文
posted @ 2022-04-26 19:09 黄海祥
阅读(30)
评论(1)
推荐(0)
2022年4月11日
实验二
摘要: x = list(range(10)) print('整数输出1: ', end = '') for i in x: print(i, end=' ') print('\n整数输出2: ', end = '') for i in x: print(f'{i:02d}', end = '-') pri
阅读全文
posted @ 2022-04-11 22:26 黄海祥
阅读(46)
评论(3)
推荐(0)
2022年3月28日
实验1 Python开发环境使用和编程初体验
摘要: 1 print('hey u') 2 3 print('hey','u') 4 x,y,z=1,2,3 5 print(x,y,z) 6 7 print('x=%d,y=%d,z=%d'%(x, y, z)) 8 print('x={},y={},z={}'.format(x,y,z)) 9 pri
阅读全文
posted @ 2022-03-28 16:55 黄海祥
阅读(26)
评论(5)
推荐(0)
公告