- 博客(8)
- 收藏
- 关注
原创 【算法图解】T4.1 用递归做加法
#include <stdio.h> int add(int array[],int num){ int ret = 0; if (num==0){ ret = 0; } else if(num==1){ ret = array[0]; printf("函数仅剩最后一个值%d\n",ret); } else{ num=num-1; printf("num=%d ",num);
2021-09-02 22:27:14
262
原创 【Mooc笔记】选择排序
选择排序 Select_sort #include <stdio.h> //When the array is not sorted, it's a way to sort it, though not quick enough. //Sort descending for example, choose the biggest one and move it to the first place, using swap. Then move the second biggest one to
2021-08-16 15:32:41
149
原创 【Mooc笔记】数组操作(找出100以内的素数)
数组操作(找出100以内的素数) 方法一: #include <stdio.h> //find out all the prime numbers smaller than NUMBERS //solution1: Traverse all the numbers, eliminating composite numbers one by one. int check_is_prime(int test_number, int prime_list[], int count_of_curren
2021-08-16 15:10:09
828
原创 【Mooc笔记】二分查找(美国的各种硬币名称)
二分查找(美国的各种硬币名称) #include <stdio.h> struct { int amount; char *name; }coins[]={ {1,"penny"}, {5,"nickel"}, {10,"dime"}, {25,"quater"}, {50,"half-dollar"}, }; //binary search can be used only un
2021-08-16 14:28:29
142
原创 简单填空题检测
复习古文默写用 from random import choice import random def check(txt):#校验 a=0 b=0 for i in txt: if i =="[": a+=1 if i =="]": b+=1 if a == b: return True else: return False def ans(txt):
2020-06-25 15:49:25
344
原创 katie的词汇
感谢我们敬爱的katie的倾囊相与! (一直想把katie的听写格式化一下,做成anki卡组,最近终于是厚着脸皮去要了来: -D 文件链接在文尾 ) 这里用python-pptx库读取pptx内容 pptx库官方文档 PyPI ppt长这样: 代码如下 所有的过程解释均在代码中 import pptx f=open("6.13pptx_try_out.txt","w") def mainprocess(): count=0 fp="Dictation.pptx" presentat
2020-06-14 08:16:21
312
原创 幕布笔记按字母顺序导出(Python+Opml)
上了几个月网课,存了上千行英语的笔记在幕布上,即将开学,得导出来带到学校以备不时之需。为了方便查阅,得按顺序导出。幕布的导出有五个格式,word,pdf, ...
2020-04-13 22:54:27
3182
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅
1