Code Monkey home page Code Monkey logo

scanning-a-dna-strand-for-genes's Introduction

Scanning-a-DNA-strand-for-genes

Uses Java string methods to pick out substrings that match gene codons

Uses the edu.duke external library found here: http://www.dukelearntoprogram.com

Assignment 1: Processing DNA Strings

Modify the program you wrote in the last lesson to also be able to answer the following questions. Make sure the program works regardless of the case of the string. Be sure to test your program on a small set of data first.

How many times does the codon CTG appear in a strand of DNA? What is the length of the longest gene in a collection of genes (that is, the longest String in a StorageResource of strings)? Assignment 2: Find All URLs

Write a program to find all the URLs on a web page and to

print the URLs, print the number of URLs found, print the the number of secure links found, print the number of links that have “.com” in them, print the number of links that end with “.com” or “.com/” and print the total number of “.” that appear in all the links. More specifically, you should:

Write the method findURLs that has one String parameter url, and it returns a StorageResource of strings that are all the URLs on the web page at the address given by url. A URL on a page comes immediately after "href=" and is in quotes, for example href=”https://amazon.com”. One can find URLs on a page by searching for “href=” to identify the start of a URL, and then searching past “href=” to find the next quotation marks. Be sure to check that the URL you find begins with "http" to avoid storing internal links.

Write the void method testURLWithStorage, which has no parameters. This method should do the following.

Call findURLs with the URL address: http://www.dukelearntoprogram.com/course2/data/manylinks.html Print all the URLs found on this page Print the number of URLs found on this page Print the number of secure links found on this page (those URLs that start with https) Print the number of links that have “.com” in the link Print the number of links that end with “.com” or “.com/” Print the total number of “.”’s that appear in all the links. (Note: the dot may appear more than once in a link such as www.amazon.com.)

scanning-a-dna-strand-for-genes's People

Contributors

mibms avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.