会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
dycdyc777
博客园
首页
新随笔
联系
订阅
管理
2023年6月11日
实验6
摘要: task1_1 实验源码 from turtle import * def move(x, y): penup() goto(x, y) pendown() def draw(n, size = 100): for i in range(n): fd(size) left(360/n) def ma
阅读全文
posted @ 2023-06-11 16:53 Praying7
阅读(15)
评论(0)
推荐(0)
2023年6月6日
实验5
摘要: task6 实验源码 # 读取并处理原始数据with open('data6.csv','r',encoding = 'gbk') as f: old_data = f.read().split('\n') del old_data[0] # 四舍五入得到新数据 new_data = [] for
阅读全文
posted @ 2023-06-06 16:15 Praying7
阅读(14)
评论(0)
推荐(0)
2023年5月22日
实验4 函数与异常处理编程
摘要: task 1 实验源码 1 print(sum) 2 sum = 42 3 print(sum) 4 5 def inc(n): 6 sum = n+1 7 print(sum) 8 return sum 9 10 sum = inc(7) + inc(7) 11 print(sum) 运行结果截图
阅读全文
posted @ 2023-05-22 16:22 Praying7
阅读(40)
评论(0)
推荐(0)
2023年4月21日
实验3
摘要: task 1 实验源码 1 import random 2 3 print('用列表存储随机整数: ') 4 lst = [random.randint(0, 100) for i in range(5)] 5 print(lst) 6 7 print('\n用集合存储随机整数: ') 8 s1 =
阅读全文
posted @ 2023-04-21 16:25 Praying7
阅读(29)
评论(0)
推荐(0)
2023年3月23日
实验2 字符串和列表
摘要: task1 实验源码 #字符串的基础操作 x = 'nba FIFA' print(x.upper()) print(x.lower()) print(x.swapcase()) print() x = 'abc' print(x.center(10, '*')) print(x.ljust(10,
阅读全文
posted @ 2023-03-23 14:30 Praying7
阅读(33)
评论(0)
推荐(0)
2023年3月9日
实验1 Python开发环境使用和编程初体验
摘要: 实验任务1 task1_1 程序源码 #task1_1 print输出的几种用法 #用法1:用于输出单个字符串或单个变量 print('hey, u') #用法2:用于输出多个数据项,用逗号分隔 print('hey','u') x,y,z = 1,2,3 print(x,y,z) #用法3:用于混
阅读全文
posted @ 2023-03-09 15:06 Praying7
阅读(38)
评论(1)
推荐(1)
公告