摘要:
源代码:from struct import unpack 读取并存储 bmp 文件 class ReadBMPFile : def init(self, filePath) : file = open(filepath, "rb") # 读取 bmp 文件的文件头 14 字节 self.bfTyp 阅读全文
posted @ 2020-10-18 09:29
棉被王Excalibur
阅读(81)
评论(0)
推荐(0)
摘要:
源代码如下: class Solution(object): def romanToInt(self, s): """ :type s: str :rtype: int """ # 使用整数转罗马数的两个列表 num_tuple = [1000, 500, 100, 50, 10, 5, 1] ro 阅读全文
posted @ 2020-10-18 08:40
棉被王Excalibur
阅读(57)
评论(0)
推荐(0)
摘要:
源代码如下: #传入一个浮点型字符串和有效数字位数 def fraction_to_binary(fraction_string, significant_binary_digits): def print_binary(number_string, fraction_length): dotlef 阅读全文
posted @ 2020-10-18 08:36
棉被王Excalibur
阅读(233)
评论(0)
推荐(0)