生物信息:找出基因,生物学家使用字母A.C.T和G构成的字符串建模一个基因组.一个基因是基因组的子串,它从三元组ATG后开始在三元组TAG.TAA或TGA之前结束.此外,基因字符串的长度是3的倍数,而且基因不包含三元组ATG.TAG.TAA和TGA.编写程序提示用户输入一个基因组,然后显示基因组里的所有基因.如果在输入序列中没有找到基因,那么程序显示“no gene is found” s=input('Please input the Gene String:\r\n') endsplit=[…
// 给定一个set字符和一个正数k,找出所有该做set它可以由长度构成k该字符串集合 /* Input: set[] = {'a', 'b'}, k = 3 Output: aaa aab aba abb baa bab bba bbb Input: set[] = {'a', 'b', 'c', 'd'}, k = 1 Output: a b c d package recursion; import java.util.ArrayList; public class N_sets_form…
请从L=[1,10,20,50,20,20,1]中找出重复数. L=[1,10,20,50,20,20,1] L1=[] for i in L: if(L.count(i)>1): L1.append(i) L2=[] for i in L1: if i not in L2: L2.append(i) print L2…
Description Have you played Draw Something? It's currently one of the hottest social drawing games on Apple iOS and Android Devices! In this game, you and your friend play in turn. You need to pick a word and draw a picture for this word. Then your f…