上一页 1 ··· 142 143 144 145 146 147 148 149 150 ··· 367 下一页
摘要: 001、 #include <stdio.h> #define diff(x, y) (x - y) ## 函数式宏, diff函数中的参数,将按照 (x -y)在函数中展开 int main(void) { int a, b; double m, n; printf("a = "); scanf( 阅读全文
posted @ 2022-08-18 22:41 小鲨鱼2018 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat a.fasta ## 测试数据 >Rosalind_1 ATCCAGCT >Rosalind_2 GGGCAACT >Rosalind_3 ATGGATCT > 阅读全文
posted @ 2022-08-18 19:14 小鲨鱼2018 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 001、方法1 root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python str1 = "GATATATGCATATACTT" str2 = "ATAT" result = [ 阅读全文
posted @ 2022-08-18 17:27 小鲨鱼2018 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 001、 root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序(起初1只兔子f[1],兔子每隔一个月有繁殖能力,没繁殖一次生3只兔子) #!/usr/bin/pyton f = [1] * 5 ## 生成一个 阅读全文
posted @ 2022-08-18 16:23 小鲨鱼2018 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 001、方法1 root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python str1 = "GAGCCTACTAACGGGAT" ## 两天等长序列 str2 = "CATCGT 阅读全文
posted @ 2022-08-18 15:35 小鲨鱼2018 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 001、 >>> test1 = ["aaa", 100, 200] >>> test1 ['aaa', 100, 200] >>> test2 = [str(k) for k in test1] ## 将列表test1中的数值转换为字符串 >>> test2 ['aaa', '100', '200 阅读全文
posted @ 2022-08-18 08:27 小鲨鱼2018 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 001、方法1 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat a.fasta ## 测试fasta文件 >Rosalind_6404 CCTGCGGAAGATCGGCACTAGAATAGCCAGAACCGTTTCTC 阅读全文
posted @ 2022-08-18 08:17 小鲨鱼2018 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 001、输出最小、最大的键或者值 >>> dict1 = {"c":800, "d":600, "a":900, "b":700} >>> dict1 {'c': 800, 'd': 600, 'a': 900, 'b': 700} >>> min(dict1) ## 输出最小的键 'a' >>> 阅读全文
posted @ 2022-08-18 08:03 小鲨鱼2018 阅读(1741) 评论(0) 推荐(0) 编辑
摘要: 001、方法1: root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python out_file = open("result.txt", "w") str1 = "AAAACCC 阅读全文
posted @ 2022-08-18 07:29 小鲨鱼2018 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 001、 #include <stdio.h> int count_bits(unsigned x) //此处定义函数, 用于返回任意unsigned 整型以二进制位表示时,1的总个数 { int bits = 0; while(x) { if(x & 1U) { bits++; } x >>= 1 阅读全文
posted @ 2022-08-18 03:27 小鲨鱼2018 阅读(1064) 评论(0) 推荐(0) 编辑
上一页 1 ··· 142 143 144 145 146 147 148 149 150 ··· 367 下一页