12 2023 档案

摘要:网上还有别的办法,不过我的笔记本是Windows11,按照下面这种方式处理之后,就OK了。 处理方法:修改注册表。 将注册表中HKEY_CLASSES_ROOT\Python.File\Shell\editwithidle\shell\edit35-32\command 将里面的路径复制到同级的op 阅读全文
posted @ 2023-12-17 10:15 Danlis 阅读(95) 评论(0) 推荐(0) 编辑
摘要:pygame的安装问题 (1)python -m pip install --upgrade pip (2)pip install pygame (3)更换下载网站,且赋予信任 pip install pygame -i http://pypi.douban.com/simple --trusted 阅读全文
posted @ 2023-12-17 10:12 Danlis 阅读(65) 评论(0) 推荐(0) 编辑
摘要:http可能会显示不安全。 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 华 阅读全文
posted @ 2023-12-17 10:09 Danlis 阅读(815) 评论(0) 推荐(0) 编辑
摘要:以前for循环的使用一直都是for(int i=0;i<10;i++)初始值,判断条件,变量处理这种形式用的,直到前两天看到有一个代码的写法是使用冒号,才知道原来C++还有这种写法。 #include<iostream> using namespace std; int main(){ int a[ 阅读全文
posted @ 2023-12-15 15:10 Danlis 阅读(34) 评论(0) 推荐(0) 编辑
摘要:list1 = list() for i in range(5): name = input(f'输入水果名字:') price = int(input(f'输入水果价格(整数):')) list1.append((name,price)) list1.sort(key=lambda x:x[1]) 阅读全文
posted @ 2023-12-15 14:20 Danlis 阅读(14) 评论(0) 推荐(0) 编辑
摘要:存储下数组拷贝 #include<iostream> using namespace std; int main(){ int a[10]={1, 2, 3, 4}, b[10], c[10]; copy(begin(a), end(a), begin(b)); for(int i=0;i<4;i+ 阅读全文
posted @ 2023-12-14 19:07 Danlis 阅读(75) 评论(0) 推荐(0) 编辑
摘要:今天在看到O(logn)的时候,先去看了下什么是对数,有一个博主说的特别好,经过勤奋的工作之后,已经忘记了什么是对数。 参考百度百科的对数公式:对数公式是数学中的一种常见公式,如果ax=N(a>0,且a≠1),则x叫做以a为底N的对数,记做x=logaN,其中a要写于log右下。其中a叫做对数的底, 阅读全文
posted @ 2023-12-14 14:15 Danlis 阅读(286) 评论(0) 推荐(0) 编辑
摘要:从CSDN https://blog.csdn.net/xiaoyaotan123/article/details/40159691 那边查到的一个解决方案,很好地解决了打不开Python的问题。 解决方案: 修改[Python目录]\Lib\idlelib\PyShell.py文件,我这边的位置在 阅读全文
posted @ 2023-12-13 14:43 Danlis 阅读(86) 评论(0) 推荐(0) 编辑
摘要:Python中for循环的局部变量i,在这里相当于是全局变量。不知道是版本问题还是其他问题,总之这里需要注意一下了。 for i in range(1, 4): print(i, end = ',') print('\n', i) for i in 'abc': print(i, end = ',' 阅读全文
posted @ 2023-12-07 15:47 Danlis 阅读(255) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示