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?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Related Computer Science Q&A

Find answers to questions asked by students like you.

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...

Q: Construct npda that accept the following languages on Σ = {a, b, c}: L = {anb3n : n ≥ 0}.

A: To construct the NPDA of the language L = {anb3n : n ≥ 0} on Σ = {a, b, c}, we will draw a machine l...

Q: Function Name: compliments Parameters: answer1 - a boolean (True or False) representing whether the ...

A: Solution:The following function displays the outputs as string of compliments.

Q: Question: Write a program that prompts the user to enter the number of students and each student's s...

A: Solution:The python program has the following algorithm:Prompt and read the total number of students...

Q: Write a function “gcDivisor” that takes two positive int “k” and “m” and returns the greatest common...

A: A call is made to a function called gcd with the numerator and denominator after receiving the user ...

Q: Write a class, AgeMessages , which does the following:a. Ask the user to enter age using a Scannerb....

A: //Import required packagesimport java.util.Scanner; //Definition of class "AgeMessage"public class A...

Q: #include#include#includeusing namespace std;// outputHtmlTitle// parameters// This function...void o...

A: We need to print the html, head and title tag in the outputHtmlTitle() method.The outputHtmlTitle() ...

Q: 21,22,23

A: An image contains white, black or different shades of grey from black (maximum gray) to white (minim...

Q: Hello! How to create a Pynthon function that strips the first letters from all file names in a direc...

A: Program Instructions:Import the os module and create a function named strip_first_letter().Ask the u...

Q: You are not required to execute the queries. However, your syntax must by accurate.You must give at ...

A: Since the full table structure is not given we make suitable assumptions to write the query:For ques...

Q: Design a program that prompts user enters user name and password. Until user entered user name as "F...

A: Note:The programming language is not mentioned in the question. So, it is programmed in Java.Step by...

Q: JAVA PROGRAM NEED TO BE SUBMITTED TOMORROW   you operate 3 hot dog stands distributed throughout tow...

A: The following override methods are created along with @Override annotation:equalsfinalizetoStringThe...

Q: Question 2 3 4

A: Question 2:Given binary value = 11012   The given binary value does not represents the decimal numbe...

Q: Write a class named StockPrice. The class constructor should accept an array of stock prices as its ...

A: First of all ,you  need to create a class .The class name is StockPrice  in which you need to create...

Q: I need help with creating a main.css, I already have the HTML.the details are in the pic and I will ...

A: You can use following code in your main.css file to format your HTML document.Note: Make use of <...

Q: write a program to enter two sides a and b of a right triangle from keyboard calculate its area and ...

A: Given below is the C++ program to enter the two sides of a right triangle and then calculate its are...

Q: You are not required to execute the queries. However, your syntax must by accurate.You must give at ...

A: 8.SELECT MOVIE_TITLE, MOVIE_YEAR, PRICE, PRICE_RENTAL_FEE FROM MOVIES WHERE MOVIE_CATEGORY = 'FAMILY...

Q: Write a program to convert between KPH and MPH in either direction.If you are driving across the bor...

A: The algorithm for the program would be as below:Declare one int variable for accepting user menu cho...

Q: Programming in C language.

A: Note:The below given program has been compiled using "repl.it" online compiler.

Q: create a new file in c++. In this lab, you will add some more functionality to the program. Use loop...

A: Program Instructions:Declare variables and write a welcome message.Always convert the user's choice ...

Q: Do you think technologies like Big Data and Predictive Analytics in Marketing would have worked 10-1...

A: The technologies like Big Data would not have worked 10-15 years back as due to lack of large datase...

Q: How do I call a function in Python from another module without using import *?

A: Statement used to call a function in python from another module without using import * statement is ...

Q: Read in 5 letters from the keyboard, reverse the order of the second and next to last letters, and p...

A: Program to reading 5 letters from the keyboards and reversing the order of the second and next to la...

Q: 6. Write a class with a constructor that accepts a String object as its argument. The class should h...

A: Two java.util classes are used – Scanner and Arrays. Scanner is used to read input string and Arrays...

Q: Cosc 1337 java Perform program setup and initializations- Prompt the user and input the starting Cel...

A: Note: The given program is compiled and executed in "NetBeans IDE"

Q: Not very familiar with RAID so I would really appreciate some help and an explanation behind the ans...

A: RAID is an acronym for Redundant Array of Independent Disk. It is a process of storing the data into...

Q: Write a grammar for the language consisting of strings built only of theletters aand b. The strings ...

A: The given language L contains the strings that have infinite number of letters but the strings must ...

Q: Hello, I have a question with the program javascript and in the program I need to create a timer in ...

A: To display the greeting message, we can declare a new variable, suppose wish, to store the greeting ...

Q: Create the physical level ERD.  I believe my physical level ERD is missing several parts. However, t...

A: Hey.....The actual design of database can be represented  by  physical E- R   diagrams.Physical ERD ...

Q: 11,12,13

A: Two main advantages of storing data digitally rather than in analog format are:Data stored in digita...

Q: Write a function that takes in three numbers as parameters and prints out the largest of the three. ...

A: Program to write a function that takes in three numbers as parameters and prints out the largest of ...

Q: Write a complete C++ program that randomly generates 20 integers between the rangeof 1 to 50 and sto...

A: The random number is generated by using rand() function from stdlib.h and in order to generate a new...

Q: Analyze the following code: Code 1: int number = 45;boolean even; if (number % 2 == 0) even = true;e...

A: First lets discuss about the first question. 1) In the first code we are declaring two variables num...

Q: (a) Find an nfa with three states that accepts the language L = {an : n ≥ 1} ∪ {bmak : m ≥ 0, k ≥ 0}

A: Graphical representation of NFA:The starting state is denoted by an empty incoming arc, the vertices...

Q: The following print code is to find out the ASCII code, character for the decimal codes,and comparis...

A: The algorithm would involve converting the input integer to character using casting operator as show...

Q: Assume the following declarations and initializations (MIN, MAX, num) are made just before each sub-...

A: 1.Program plan:Define the class.Define the “main()” function.Initialize the necessary variables.The ...

Q: SQL (Oracle) How do I create a unique constraint to find a specific price range? i.e. between 30 - 1...

A: Query to create tabale:Let us assume the table name as "Product". CREATE TABLE PRODUCT(ORDER_ID INT,...

Q: Hi,  Please,I have a question with Python,I have to create a Loop and terminate BMI calculation flow...

A: The loop of flow chart for BMI is given as:

Q: Design a Turing machine that computes the function f (x) = x − 2 if x > 2   = 0 i...

A: Click to see the answer

Q: Consider the following procedure: procedure mystery (x, y, z); integer x, y, z;beginz =2; y = z + x;...

A: Call by reference The arguments passed to a function will copy the address of an argument into the f...

Q: Help.

A: Below is the algorithm:-startfunction rotate4ints(i,j,k,m)declare integer temp1=ii=mdeclare integer ...

Q: I need to write the subnet mask, subnet address, broadcast address and valid host range for 192.168....

A: The given IP address is 192.168.100.25 with subnet mask as/30. To calculate subnet mask, subnet addr...