Develop pseudocode for the problem of reading in an arbitrary number of DNA (deoxyribonucleic acid) bases, one at a time, and print out the complementary base sequence in the same order as the DNA bases were input.  There are four DNA bases:  A (adenine), C (cytosine), G (guanine), T (thymine).  You should verify that a correct base is input each time and print out an error message if it is incorrect.  Assume that “!” is used as the input symbol to indicate that no more DNA bases will be entered (i.e., it is the end of the DNA base sequence).  The following table shows the complementary base for each DNA base: DNA Base Complementary Base A T C G G C T A   As an example, if the input is “ATGGTCA”, then the output should be “TACCAGT”.

Question

Develop pseudocode for the problem of reading in an arbitrary number of DNA (deoxyribonucleic acid) bases, one at a time, and print out the complementary base sequence in the same order as the DNA bases were input.  There are four DNA bases:  A (adenine), C (cytosine), G (guanine), T (thymine).  You should verify that a correct base is input each time and print out an error message if it is incorrect.  Assume that “!” is used as the input symbol to indicate that no more DNA bases will be entered (i.e., it is the end of the DNA base sequence).  The following table shows the complementary base for each DNA base:

DNA Base

Complementary Base

A

T

C

G

G

C

T

A

 

As an example, if the input is “ATGGTCA”, then the output should be “TACCAGT”.

Expert Answer

Want to see the step-by-step answer?

See Answer

Check out a sample Q&A here.

Want to see this answer and more?

Step-by-step answers are written by subject experts who are available 24/7. Questions are typically answered in as fast as 30 minutes.*

See Answer
*Response times vary by subject and question complexity. Median response time is 34 minutes and may be longer for new subjects.

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A

Q: What are the errors in the following code?

A: Given below are the errors found in the code send by you along with an error free code.

Q: C++ my programming lab 11.7: Customer AccountsWrite a program that uses a structure to store the fol...

A: Solution:Given data,The C++ code use 20 structures to get the user data, change account information,...

Q: What would the output be when the user taps or clicks the btnDrivingAge button   Private Sub btnDri...

A: Form1:

Q: a. Assuming that x is 1, show the result of the following Boolean expressions.(true) && (3 &...

A: Hey, since there are multiple sub-part posted, we will answer first three sub-part. If you want any ...

Q: This code is for python

A: This is a very long problem because of lack of space we provide only a portion of the algorithm. How...

Q: how to write a function that takes an integer n and prints all of the integers between 1 and n which...

A: Since no programming language is specified we choose python as it is one of most popular programming...

Q: Create a new file in c++ and save it as lab11_XYZ.cpp (replace XYZ with your initials). Create ANOTH...

A: Program Instructions:In the header file, create a temporary variable temp of the data type of each v...

Q: Eliminate all useless productions from the grammar S → aS|AB|λ, A → bA, B → AA. What language does t...

A: A useless production is basically a production which can never participate in the derivation of any ...

Q: Cell Phones Records In this part, you are required to write a program, using linked lists, that man...

A: In the given question, some parts of the question are missing to use linked lists.Here, I have creat...