• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






Luke-FOX-31415926

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2023年6月6日

实验7 面向对象编程与内置模块
摘要: task1.py original_code: class Account: def __init__(self,name,account_number,initial_amount = 10): self._name = name self._card_no = account_number se 阅读全文
posted @ 2023-06-06 23:06 吴曦远123 阅读(26) 评论(0) 推荐(0)
 
2023年5月31日吴曦远202283820011实验五
摘要: task1_1.py code: with open('data1.txt','r',encoding='utf-8')as f: data=f.readlines() n=0 print(data) for line in data: if not line.strip()=='': n+=1 p 阅读全文
posted @ 2023-06-06 14:48 吴曦远123 阅读(38) 评论(0) 推荐(0)
 
2023年6月5日【实验6】吴曦远202283820011
摘要: task1_1.py code: 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) de 阅读全文
posted @ 2023-06-06 09:57 吴曦远123 阅读(26) 评论(0) 推荐(0)
 

2023年3月22日

2023年3月22日【实验二】吴曦远
摘要: task1.py 源代码: x = 'nba FIFA' print(x.upper()) # 字符串转大写 print(x.lower()) # 字符串转小写 print(x.swapcase()) # 字符串大小写翻转 x = 'abc' print(x.center(10, '*')) # 字 阅读全文
posted @ 2023-03-22 11:30 吴曦远123 阅读(25) 评论(0) 推荐(0)
 

2023年3月13日

大学物理实验取小数点后n位计算【四舍六入五求偶】
摘要: n = int(input()) initial_number = input() length_1 = len(initial_number)-1 print (length_1) digit_1 = initial_number.find('.') print('digit number:'+s 阅读全文
posted @ 2023-03-13 21:44 吴曦远123 阅读(111) 评论(0) 推荐(0)
 

2023年3月8日

2023年3月8号[实验一]吴曦远
摘要: task1_1.py 源代码: print('hey', ' u') x,y,z = 1,2,3 print(x, y, z) print('x = %d, y = %d, z = %d' %(x,y,z)) print('x = {}, y = {}, z = {}'.format(x,y,z)) 阅读全文
posted @ 2023-03-08 11:34 吴曦远123 阅读(33) 评论(0) 推荐(0)
 
输入秒数,用Python语言计算其所代表的年数
摘要: 源代码: 1 total_time = input('Enter a integer') 2 One_year = 360*60*60*24 3 year= float(total_time)/float(One_year) 4 print('year={:.0f}'.format(year)) 若 阅读全文
posted @ 2023-03-08 11:08 吴曦远123 阅读(56) 评论(0) 推荐(0)
 
Test_Moduel AA0002
摘要: 1 # 使用字符串的format()方法,对输出数据项进行格式化 2 x1, y1 = 1.2, 3.57 3 x2, y2 = 2.26, 8.7 4 # 输出1 5 print('{:-^40}'.format('输出1')) # {:-^40}控制输出数据格式: 宽度占40列,居中对齐,空白处 阅读全文
posted @ 2023-03-08 10:57 吴曦远123 阅读(18) 评论(0) 推荐(0)
 
Test_Moduel AA0001
摘要: 10:41:47 1 print('hello python') 2 x,y,z=1,2,3 3 print(x,y,z) 4 print(f'x = {x}, y = {y}, z = {z}') 阅读全文
posted @ 2023-03-08 10:45 吴曦远123 阅读(21) 评论(0) 推荐(0)