![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
柒月671
这个作者很懒,什么都没留下…
展开
-
嗯嗯嗯嗯嗯
# 实验4# class MyError(Exception):# def __init__(self, string):# super().__init__()# self.string = string## def __str__(self):# if len(self.string) < 5: # 判断# return 'The input is of length 3,expecting at le...原创 2022-05-04 17:21:39 · 193 阅读 · 0 评论 -
呜呜呜无语
# 实验2 import random import csv import os def unicode(): val = random.randint(0x4e00, 0x9fbf) return chr(val) with open('info.csv', 'w', newline='', encoding='utf-8') as f: # encoding指定编码格式,否则写入乱码 head = ['姓名', '性别', '年龄', '成绩'] # 表头 ...原创 2022-05-04 17:15:27 · 161 阅读 · 4 评论