摘要: task1 源代码: 1 class Account: 2 def __init__(self, name, account_number, initial_amount = 10): 3 self._name=name 4 self._card_no=account_number 5 self._ 阅读全文
posted @ 2023-06-14 01:07 娄泽涛 阅读(16) 评论(0) 推荐(0)
摘要: 实验任务一 task1 源代码 View Code 运行截图 函数名(line1)、参数(line3、7、11),其中line7为自定义函数inc内参数 实验任务二 task2_1 源代码 View Code 运行截图 task2_2 源代码 View Code 运行截图 由源代码task2_1可得 阅读全文
posted @ 2023-05-22 20:44 娄泽涛 阅读(15) 评论(0) 推荐(0)
摘要: 实验任务1 task1 源代码 View Code 运行截图 问题一:random.randint(a,b)的范围即为a到b,两边均可取到 问题二:list(range(5))生成的有序数列为[0,1,2,3,4]不包括5 问题三:不一定,如若随机到重复数字则长度小于五 问题四:一定 实验任务2 t 阅读全文
posted @ 2023-04-25 16:23 娄泽涛 阅读(26) 评论(0) 推荐(0)
摘要: 实验任务1 task1.py 源代码 View Code 运行截图 实验任务2 task2.py 源代码 View Code 运行截图 实验任务3 task3.py 源代码 View Code 运行截图 实验任务4 task4.py 源代码 View Code 实验任务5 task5.py 源代码 阅读全文
posted @ 2023-03-25 16:15 娄泽涛 阅读(23) 评论(0) 推荐(0)
摘要: 实验任务一 源代码task1_1.py View Code 运行截图 源代码task1_2.py View Code 运行截图 源代码task1_3.py 1 name1,age1='Bill',19 2 name2,age2='Hellen',18 3 title='personnel Infor 阅读全文
posted @ 2023-03-15 00:50 娄泽涛 阅读(42) 评论(0) 推荐(0)
摘要: 1 ans1=0.1+0.2 2 print(f'0.1+0.2={ans1}') 3 4 import decimal 5 6 ans2=decimal.Decimal('0.1')+decimal.Decimal('0.2') 7 print(f'0.1+0.2={ans2}') View Co 阅读全文
posted @ 2023-03-13 21:24 娄泽涛 阅读(10) 评论(0) 推荐(0)