摘要: 0: 不用重新定义 或者使代码不至于太长。 1:报错 2:不会 但是会屏蔽 3:重新定义下pass 这样会屏蔽 4:木知 很强反正 5:不知道啊 你想实现什么样的呢 6:同上 不想重复嘛 用super() 7: import math import random print(math.sqrt(25 阅读全文
posted @ 2021-07-06 15:25 yi术家 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 36: 0: 变量和函数 1:不同说法? 模具和用这个模具做出的物体 class A 是类 a = A()那么a是对象。 抽象和具体 2:种类 速度 颜色 大小 性格 错 前面的都是属性 问对象 那就是 波斯猫 咖啡猫 加菲猫 布偶猫 中华田园猫 3:长 宽 求面积 求周长 4:抽象 符合面向对象的 阅读全文
posted @ 2021-06-29 20:53 yi术家 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 0: g.integerbox 表示只输入整数的对话框 1:. g.multenterbox 用来表示多个输入框。 import easygui as g msg = "请填写以下联系方式" title = "账号中心" fieldNames = [" *用户名", " *真实姓名", " 固定电话 阅读全文
posted @ 2021-06-28 20:33 yi术家 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 1 : >>> my_list = [1, 2, 3, 4,,] 有错但不知道什么错 原来是语法错误 2: >>> my_list = [1, 2, 3, 4, 5] >>> print(my_list[len(my_list)]) 越界访问 indexerror 3: >>> my_list = 阅读全文
posted @ 2021-06-21 20:12 yi术家 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 0: import os all_files = os.listdir(os.curdir) type_dict = {} type_dict['文件夹'] = 0 for each in all_files: if os.path.isdir(each): type_dict['文件 阅读全文
posted @ 2021-06-18 19:49 yi术家 阅读(28) 评论(0) 推荐(0) 编辑
摘要: file_name = input('请输入文件名:') print('请输入内容,单独输入“:w” 保存退出:') f = open(file_name,'w') text =input() while text != ':w': f.write(text+'\n') text =input() 阅读全文
posted @ 2021-06-10 20:30 yi术家 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 0: 不知道啊 去除重复元素? 1:frozenset 2:len(x) 3:直接一个错的报 4:好像一样 错 完全不一样的说 set = {[1,2]}这是想干嘛 ;列表怎么可以进集合呢? 5:1=1.0 对于集合来说 6.add .remove 二十八:: 0: 目测b' 因为\t做表格去了 1 阅读全文
posted @ 2021-06-08 19:52 yi术家 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 0:是在说一种索引的对应关系吧 1: a={'F':70,'F': 70, 'C': 67, 'h': 104, 'i': 105, 's': 115} print(a['C']) 2:不是很对 感觉 3:映射关系嘛 4:坑 看半天不知道啥差别 5: data.split(',') 6: print 阅读全文
posted @ 2021-06-07 20:56 yi术家 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 0:十转2 def my_bin(x): a ='' if x : a = my_bin(x//2) return a+str(x%2) else: a+='0b' return a print(my_bin(20)) 1:分十位 def get_digits(n): a = [] if n: a 阅读全文
posted @ 2021-06-07 19:43 yi术家 阅读(38) 评论(0) 推荐(0) 编辑
摘要: ​ 1 训练时 model = Word2Vec(x, size=250, window=5, min_count=5, workers=12, iter=10, sg=1) 这句代码一直报错 查了发现 size和iter依然是时代的眼泪了。改成下面 model = Word2Vec(x, vect 阅读全文
posted @ 2021-06-04 17:19 yi术家 阅读(1678) 评论(0) 推荐(0) 编辑