Yorkville High School Computer Science Department
Yorkville High School Computer Science Department on Facebook  Yorkville High School Computer Science Department Twitter Feed  Yorkville High School Computer Science Department on Instagram

Yorkville High School Computer Science

ASSIGNMENTS: No Current Assignments

Computer Programming I :: Projects :: DNA to RNA

Department Connection: Science

 

Problem

A strand of DNA is composed of adenine, thymine, cytosine, and guanine. RNA is composed of three of the same compounds, but thymine is replaced by uracil. These compounds are represented by the letters A, T, C, G, and U.

Given a string of DNA entered into a textbox, show the RNA sequence with any instances of T replaced with the letter U.

Specific Requirements

  1. You will need a while loop to go through the string of text.
  2. Use the substring method to look at each letter of the string.
  3. You should create a variable that starts empty, but gradually fills with letters from the string or the letter U.
  4. Test out your program with the string GATGGAACTTGACTACGTAAATT. It should output GAUGGAACUUGACUACGUAAAUU.
  5. Determine a good name for each variable following the rules.
  6. Rename the form and all controls on the form using a three-letter prefix.
  7. Add a comment header following class guidelines.

Tips

Yorkville High School Computer Science Department on Facebook Yorkville High School Computer Science Department Twitter Feed Yorkville High School Computer Science Department on Instagram