Some computer forensic software is used to find patterns in
Some computer forensic software is used to find patterns in documents, write a Python program that finds and prints phone number in a line of text, write at least one function that identifies a string of digits and hyphen, as ddd-ddddd. prompt user for the line of text
Solution
import edu.duke.*; import java.io.*; public class FindMultiGenes { public String findGenes(String dnaOri) { String gene = new String(); String dna = dnaOri.toLowerCase(); int start = -1; while(true){ start = dna.indexOf(\"atg\", start); if (start == -1) { break; } int stop = findStopCodon(dna, start); if(stop > start){ String currGene = dnaOri.substring(start, stop+3); System.out.println(\"From: \" + start + \" to \" + stop + \"Gene: \" +currGene);} } return gene; } private int findStopCodon(String dna, int start){ for(int i = start + 3; i