用python写一个含有敏感信息的文档自动加密的软件,步骤如下:首先弹窗自己选择某个文件夹或某个盘,然后查找其中存在的word和excel文档,检索文档中是否存在身份证号码、电话号码、银行卡号码这三种敏感信息,超过5条的,判定为敏感文件,然后弹出一个密码输入框,输入自己想要的密码,使用这个密码对刚刚选择的那个文件里面的所有含有敏感信息的文档进行加密
1条回答 默认 最新
关注 - 这个问题的回答你可以参考下: https://ask.csdn.net/questions/7736413
- 除此之外, 这篇博客: 4.Python数据结构与算法分析课后习题(第二版)__chapter4中的 14.假设一个计算机科学家兼艺术大盗闯入美术馆。他只能用一个容量为W磅的背包来装盗取的艺术品,并且他对每一件艺术品的价值和重量了如指掌。他会如何写一个动态规划程序来帮助自己最大程度地获利呢?下面的例子可以帮助你思考:假设背包容量是20磅,艺术品为5件。 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
艺术品 重量 价值 1 2 3 2 3 4 3 4 8 4 5 8 5 9 10 def dpMaxValue(objectsValueDic, weights, maxValue, objectsUsed): for weight in range(weights + 1): nowValue = objectsValueDic[0] newWeight = 0 for j in [c for c in objectsValueDic.keys() if c <= weight]: if maxValue[weight - j] + objectsValueDic[j] > nowValue: nowValue = maxValue[weight - j] + objectsValueDic[j] newWeight = j maxValue[weight] = nowValue objectsUsed[weight] = newWeight return maxValue[weights] def printWeight(objectsUsed, weights): weight = weights out = [] while weight > 0: thisWeight = objectsUsed[weight] if thisWeight == 0: break out.append(thisWeight) weight -= thisWeight print('weights:',out) if __name__ == '__main__': objectsValueDic = {0 : 0, 2 : 3, 3 : 4, 4 : 8, 5 : 8, 9 : 10} weights = 20 objectsUsed = [0] * (weights+1) print('value :',dpMaxValue(objectsValueDic, weights, [0] * (weights+1), objectsUsed)) printWeight(objectsUsed, weights)
解决 无用评论 打赏 举报
悬赏问题
- ¥15 rt-thread线程切换的问题
- ¥20 python忆阻器数字识别
- ¥15 无法输出helloworld
- ¥15 高通uboot 打印ubi init err 22
- ¥20 PDF元数据中的XMP媒体管理属性
- ¥15 R语言中lasso回归报错
- ¥15 网站突然不能访问了,上午还好好的
- ¥15 有没有dl可以帮弄”我去图书馆”秒选道具和积分
- ¥15 semrush,SEO,内嵌网站,api
- ¥15 Stata:为什么reghdfe后的因变量没有被发现识别啊