Description
Nesting: L. 2 Application, Code Writing (Biology). Write a program to transcribe DNA to RNA. Have the user enter a string called dna, then loop over it and transcribe each character as follows: A->U, T->A, C->G, G->C. Make sure it is formatted correctly [5]. Example interaction is shown below.
> ACGTGA // input < UGCACU // outputnote: I have written a program that will transcribe one into the other, but I can't figure out how to get it to transcribe a string input. This is what I have come up with:
#include <iostream>
using namespace std;
int main()
{
cout << "> ";
cin >> dna;
int a = dna;
cout << "< ";
if (a == 'A') cout << 'U';
else if (a == 'C') cout << 'G';
else if (a == 'G') cout << 'C';
else if (a == 'T') cout << 'A';
cout << " "<< endl;
return 0;
}
I'm pretty sure the program has to include a for loop, but I'm uncertain as to how to initialize it and what the condition would be.
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
Review
Review
Anonymous
Very useful material for studying!
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
North Carolina State University Templatized Version of A Linked List Class Project
Write the member function to search() the linked list for a particular piece of information. The search functiontakes a co ...
North Carolina State University Templatized Version of A Linked List Class Project
Write the member function to search() the linked list for a particular piece of information. The search functiontakes a const T& as its parameter and it returns a boolean result. This member function should also be declaredas a const member function, as it does not change the list if it is called. An example implementaiton for this functionis actually given in our textbook, though you may need to change it slightly to work with our assignment code.2. Also add/write the deleteNode() member function, which is also given in our textbook implementation. Thisfunction takes a const T& as its parameter, which is the value of an item to search for and delete. Thus thefirst part of this function is similar to the search() function, in that you first have to perform a search to findthe item. But once found, the node containing the item should be removed from the list (and you should freethe memory of the node). This function is only guaranteed to find the first instance of the item and delete it, ifthe item appears multiple times in the list, the ones after the first one will still be there after the first itemis removed by this function. This function should return a LinkedListItemNotFoundException if the itemasked for is not found. The LinkedListItemNotFoundException class has already been defined for you in thestarting template header file.3. Write a member function named findItemAtIndex() for the LinkedList class. This function will be given asingle integer parameter called index. It will search through the linked list and return a reference to the info ofindex’th node in the list. It is important that you return a T& (a reference to a type T) from this function.This function works using 0 based indexing (like arrays), thus if we ask for index 0, the first or head node infoshould be returned. If we ask for index 1, the info in the node after the head node is returned. If the list onlyhas 5 nodes (indexes 0 to 4) and we ask for index 5 or greater, you should throw a LinkedListItemNotFoundexception. (This exception class has already been defined in the LinkedList header given to you, you simplyneed to throw it). For a little extra credit, you can add the overloaded operator[] to define indexing operationson your LinkedList which just uses your working findItemAtIndex() member function.4. Write a member function named deleteItemAtIndex(). This function will perform similar to the previous one,but instead of returning the info in the index’thed node, it will simply delete the node. Thus your logic will besimilar to task 3, you will need to search till you get to the index’thed node in the list. But at that point youshould remove the node (and don’t forget to delete it, to free up its memory). If the asked for index does notexist, as usual you should throw a LinkedListItemNotFound exception.5. Extra credit: you can write this recursive member function for a little bit of additional extra credit. Writea member function named toReverseString(). There is already a string function, that creates a stringrepresentation of the items in the list and returns the string. Your method will create a string of the items in2
Arizona State University Palindrome String Function Python Program Project
IntroductionThis lab has two parts. For each part, submit a Python script named ASURITE_part#.py, where ASURITE is your AS ...
Arizona State University Palindrome String Function Python Program Project
IntroductionThis lab has two parts. For each part, submit a Python script named ASURITE_part#.py, where ASURITE is your ASURITE user name and # is the part of the lab your script file solves.Please ensure that the output of your script matches the provided sample output.Part 1: Palendrome A string is a palindrome if it reads the same forward and backward. The words “mom,” “dad,” and “noon,” for instance, are all palindromes.The problem is to write a program that prompts the user to enter a string and reports whether the string is a palindrome. One solution is to have the program check whether the first character in the string is the same as the last character. If so, then the program can check whether the second character is the same as the second-to-last character. This process continues until a mismatch is found or all the characters in the string are checked, except for the middle character if the string has an odd number of characters.To implement this idea, you can use two variables, say low and high, to denote the position of two characters at the beginning and the end in a string s.Write a function isPalindrome() that takes a string and return True if it is a palindrome, and False if not.Write the main() function that takes the string from the user and passes it to the isPalindrome() function, then prints the appropriate messageSample OutputEnter a string: noonnoon is a palindromeEnter a string: moonmoon is not a palindromePart 2: Future tuitionSuppose that the tuition for a university is $10,000 this year and increases 7% every year. In how many years will the tuition have doubled?Before you attempt to write a program, first consider how to solve this problem by hand.Sample OutputTuition will be doubled in 11 years Tuition will be $21048.52 in 11 years
CMIT 421 University of Maryland VM Scanner Evaluation Background Report
You should link your analysis to the kinds of organizational functions and data associated with a transportation company ( ...
CMIT 421 University of Maryland VM Scanner Evaluation Background Report
You should link your analysis to the kinds of organizational functions and data associated with a transportation company (e.g., protecting order data, customer lists, sales leads, Payment Card Industry (PCI) compliance for processing credit, proprietary software, etc.) and provide your recommendation if Mercury USA should purchase the Nessus tool. This report should be four to six pages in length and include a title/cover page. Include in-text citations and a reference page with three quality sources in a citation style of your choice.https://learn.umgc.edu/content/enforced/602243-027...For this assignment, you are asked to provide your supervisor, Judy, with a technical evaluation of a vulnerability scanner. By documenting your results in an effective background report, you are showing how you use your technical knowledge to convey your ideas to others in a professional setting. Your ability to express your findings using the right mix of technical detail in a business context is an important workplace skill.The following evaluation criteria aligned to the competencies will be used to grade your assignment:1.3.1: Identify potential sources of information that can be used to develop and support ideas.1.4.1: Produce grammatically correct material in standard academic English that supports the communication.10.1.1: Identify the problem to be solved.12.2.1: Identify systems for the risk assessment.12.3.1: Select controls.13.2.1: Evaluate vendor recommendations in the context of organization requirements.
ISSC471 AMU Federal Information Security Management Act Report
I would like to have you read and analyze an Office of
Inspector General (OIG) report. I picked the 2012 FISMA Audit rep ...
ISSC471 AMU Federal Information Security Management Act Report
I would like to have you read and analyze an Office of
Inspector General (OIG) report. I picked the 2012 FISMA Audit report of
the Department of Education. Please visit the lick below to review the
report:http://www2.ed.gov/about/offices/list/oig/auditreports/fy2013/a11m0003.pdfSubmission Instructions:Please
write a brief report listing the controls tested and the result of the
test. You may express your opinion or thoughts on the findings. The goal
is familiarize everyone with an Audit Report related to FISMA. I am
looking for 500 to 600 words, using APA Style formatting.
Oregon State University Python Coding Project Paper
I need help with my Python Code. I am missing several requirements for my code to work properly as stated by the attachmen ...
Oregon State University Python Coding Project Paper
I need help with my Python Code. I am missing several requirements for my code to work properly as stated by the attachments. Attached are the prompt, specifics, and missed test results from my current code.
Writing a Dice Game Usiing Blue J Exercise
Task #1 The Dice GameWrite a DiceYI class with one instance variable, value. Constructor with a parameter for the initial ...
Writing a Dice Game Usiing Blue J Exercise
Task #1 The Dice GameWrite a DiceYI class with one instance variable, value. Constructor with a parameter for the initial face value. Validate that it allows only 1..6.Accessors getValue( ) which returns an integer. Mutators setValue( ) to set value. Validate it only sets 1..6 Mutator roll( ) which randomize the instance variable to 1..6toString( ) method to return a string like "3" or "6"printMe( ) method for DEBUG. This should simply print the value in toString( ).Write a class (NOT A SUBCLASS) DicePairYI with a 2 element array of type DiceYI.Default constructor: Use Random class methods to initialize each DiceYI Constructor with a parameter for the initial face values. Validate that it allows only 1..6.Accessor getValue( i ) which returns the value of the first or second DiceYI. Accessor getTotal( ) which returns the sum the array DiceYI face values.Mutators setValue( i ) to set value. Let DiceYI validate it only sets 1..6 Mutator roll( ) which randomizes each DiceYI in the arraytoString( ) method to return a string like "3, 4" or "6, 5"equals( ) method to compare a pair of dice with another pair of dice. Return true if they have the same face values. For example if one DicePairYI object has 4,6 and the other has 6,4 they are equal.printMe( ) method for DEBUG. This should simply print the value in toString( ).Write a client DiceGame1YOURNAME.Instantiate and initialize a pair of diceInstantiate score, a 20 element integer array of integers and initialize it to all 0.Write a play( ) method for a new game, it should reset the game and then continuously roll the dice until you win or lose or the array is full.Each roll is entered in the array until you win, lose, or the array is full.Write a printArray( ) method to print the score array on ONE line. Make it easy to read by adding a " - " after every 5 scores e.g. 4 8 9 8 5 - 7 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 The rules of the game: A player rolls the two dice and adds the number shown on them.Roll the two dice up to 20 times and save the total in the array.If the total is 7 or 11, you win. Put this in the array, report the results and exit the game.If the total is 2, 3, or 12, you lose. Put this in the array, report the results and exit the game.If the total is anything else, save the total as the "goal". put it in the array, and you get to roll again.The new objective is to roll the same total as the "goal".You keep rolling until you either get "goal" or a 7. Show the array.If you roll "goal", you win. Put this in the array, report the results and exit the game.If you roll a 7, you lose. Put this in the array, report the results and exit the game.Sample Terminal:You win: 10 10 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You win: 7 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You win: 8 11 8 0 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You lose: 6 3 3 7 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You lose: 4 5 5 12 9 - 6 6 7 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You win: 8 8 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0
Similar Content
Rochester College Python Questions
(CH12) Program Assignment Instructions
Last Changed: 9/17/2021 10:13 AM
Read and follow the directions below carefully an...
JavaScript and PHP project , programming homework help
I need help to do my JavaScript and PHP project. ...
IT 110 Saudi Electronic University Computer Organization Cache Memory Questions
This Assignment must be submitted on Blackboard via the allocated folder.Email submission will not be accepted.You are adv...
(use R studio) Finance business statistics assignment
assignment (see R assignment attached)Screenshot the R studio answer to Word,1.There are two dataset for Assignment , on...
D'Angelo Food Fusion
Return to your Food Fusion website. Our goal is to gain a better understanding of how this website is performing in terms ...
C++ AVL Trees Programming Report
Complete the BinaryTree.cpp. Other files are given, and also the instructions.I post them in a zip file.This is C++ AVL tr...
Lab Solution
-- Creating a new table called ‘phone’ in the sakila database. -- phone_id, phone_number, and country_code have data t...
Unit 3 Individual Project
Architectural views refer to how the overall system of and organization is represented in a more meaningful way to one or ...
20170203095134san Antonio Excel
...
Related Tags
Book Guides
Notes from Underground
by Fyodor Dostoyevsky
Freakonomics
by Stephen J. Dubner and Steven D. Levitt
The Good Earth
by Pearl S. Buck
To Kill a Mockingbird
by Harper Lee
A Farewell To Arms
by Ernest Hemingway
How to Win Friends and Influence People
by Dale Carnegie
Les Miserables
by Victor Hugo
The Dispossessed
by Ursula Kroeber Le Guin
Crime and Punishment
by Fyodor Dostoyevsky
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
North Carolina State University Templatized Version of A Linked List Class Project
Write the member function to search() the linked list for a particular piece of information. The search functiontakes a co ...
North Carolina State University Templatized Version of A Linked List Class Project
Write the member function to search() the linked list for a particular piece of information. The search functiontakes a const T& as its parameter and it returns a boolean result. This member function should also be declaredas a const member function, as it does not change the list if it is called. An example implementaiton for this functionis actually given in our textbook, though you may need to change it slightly to work with our assignment code.2. Also add/write the deleteNode() member function, which is also given in our textbook implementation. Thisfunction takes a const T& as its parameter, which is the value of an item to search for and delete. Thus thefirst part of this function is similar to the search() function, in that you first have to perform a search to findthe item. But once found, the node containing the item should be removed from the list (and you should freethe memory of the node). This function is only guaranteed to find the first instance of the item and delete it, ifthe item appears multiple times in the list, the ones after the first one will still be there after the first itemis removed by this function. This function should return a LinkedListItemNotFoundException if the itemasked for is not found. The LinkedListItemNotFoundException class has already been defined for you in thestarting template header file.3. Write a member function named findItemAtIndex() for the LinkedList class. This function will be given asingle integer parameter called index. It will search through the linked list and return a reference to the info ofindex’th node in the list. It is important that you return a T& (a reference to a type T) from this function.This function works using 0 based indexing (like arrays), thus if we ask for index 0, the first or head node infoshould be returned. If we ask for index 1, the info in the node after the head node is returned. If the list onlyhas 5 nodes (indexes 0 to 4) and we ask for index 5 or greater, you should throw a LinkedListItemNotFoundexception. (This exception class has already been defined in the LinkedList header given to you, you simplyneed to throw it). For a little extra credit, you can add the overloaded operator[] to define indexing operationson your LinkedList which just uses your working findItemAtIndex() member function.4. Write a member function named deleteItemAtIndex(). This function will perform similar to the previous one,but instead of returning the info in the index’thed node, it will simply delete the node. Thus your logic will besimilar to task 3, you will need to search till you get to the index’thed node in the list. But at that point youshould remove the node (and don’t forget to delete it, to free up its memory). If the asked for index does notexist, as usual you should throw a LinkedListItemNotFound exception.5. Extra credit: you can write this recursive member function for a little bit of additional extra credit. Writea member function named toReverseString(). There is already a string function, that creates a stringrepresentation of the items in the list and returns the string. Your method will create a string of the items in2
Arizona State University Palindrome String Function Python Program Project
IntroductionThis lab has two parts. For each part, submit a Python script named ASURITE_part#.py, where ASURITE is your AS ...
Arizona State University Palindrome String Function Python Program Project
IntroductionThis lab has two parts. For each part, submit a Python script named ASURITE_part#.py, where ASURITE is your ASURITE user name and # is the part of the lab your script file solves.Please ensure that the output of your script matches the provided sample output.Part 1: Palendrome A string is a palindrome if it reads the same forward and backward. The words “mom,” “dad,” and “noon,” for instance, are all palindromes.The problem is to write a program that prompts the user to enter a string and reports whether the string is a palindrome. One solution is to have the program check whether the first character in the string is the same as the last character. If so, then the program can check whether the second character is the same as the second-to-last character. This process continues until a mismatch is found or all the characters in the string are checked, except for the middle character if the string has an odd number of characters.To implement this idea, you can use two variables, say low and high, to denote the position of two characters at the beginning and the end in a string s.Write a function isPalindrome() that takes a string and return True if it is a palindrome, and False if not.Write the main() function that takes the string from the user and passes it to the isPalindrome() function, then prints the appropriate messageSample OutputEnter a string: noonnoon is a palindromeEnter a string: moonmoon is not a palindromePart 2: Future tuitionSuppose that the tuition for a university is $10,000 this year and increases 7% every year. In how many years will the tuition have doubled?Before you attempt to write a program, first consider how to solve this problem by hand.Sample OutputTuition will be doubled in 11 years Tuition will be $21048.52 in 11 years
CMIT 421 University of Maryland VM Scanner Evaluation Background Report
You should link your analysis to the kinds of organizational functions and data associated with a transportation company ( ...
CMIT 421 University of Maryland VM Scanner Evaluation Background Report
You should link your analysis to the kinds of organizational functions and data associated with a transportation company (e.g., protecting order data, customer lists, sales leads, Payment Card Industry (PCI) compliance for processing credit, proprietary software, etc.) and provide your recommendation if Mercury USA should purchase the Nessus tool. This report should be four to six pages in length and include a title/cover page. Include in-text citations and a reference page with three quality sources in a citation style of your choice.https://learn.umgc.edu/content/enforced/602243-027...For this assignment, you are asked to provide your supervisor, Judy, with a technical evaluation of a vulnerability scanner. By documenting your results in an effective background report, you are showing how you use your technical knowledge to convey your ideas to others in a professional setting. Your ability to express your findings using the right mix of technical detail in a business context is an important workplace skill.The following evaluation criteria aligned to the competencies will be used to grade your assignment:1.3.1: Identify potential sources of information that can be used to develop and support ideas.1.4.1: Produce grammatically correct material in standard academic English that supports the communication.10.1.1: Identify the problem to be solved.12.2.1: Identify systems for the risk assessment.12.3.1: Select controls.13.2.1: Evaluate vendor recommendations in the context of organization requirements.
ISSC471 AMU Federal Information Security Management Act Report
I would like to have you read and analyze an Office of
Inspector General (OIG) report. I picked the 2012 FISMA Audit rep ...
ISSC471 AMU Federal Information Security Management Act Report
I would like to have you read and analyze an Office of
Inspector General (OIG) report. I picked the 2012 FISMA Audit report of
the Department of Education. Please visit the lick below to review the
report:http://www2.ed.gov/about/offices/list/oig/auditreports/fy2013/a11m0003.pdfSubmission Instructions:Please
write a brief report listing the controls tested and the result of the
test. You may express your opinion or thoughts on the findings. The goal
is familiarize everyone with an Audit Report related to FISMA. I am
looking for 500 to 600 words, using APA Style formatting.
Oregon State University Python Coding Project Paper
I need help with my Python Code. I am missing several requirements for my code to work properly as stated by the attachmen ...
Oregon State University Python Coding Project Paper
I need help with my Python Code. I am missing several requirements for my code to work properly as stated by the attachments. Attached are the prompt, specifics, and missed test results from my current code.
Writing a Dice Game Usiing Blue J Exercise
Task #1 The Dice GameWrite a DiceYI class with one instance variable, value. Constructor with a parameter for the initial ...
Writing a Dice Game Usiing Blue J Exercise
Task #1 The Dice GameWrite a DiceYI class with one instance variable, value. Constructor with a parameter for the initial face value. Validate that it allows only 1..6.Accessors getValue( ) which returns an integer. Mutators setValue( ) to set value. Validate it only sets 1..6 Mutator roll( ) which randomize the instance variable to 1..6toString( ) method to return a string like "3" or "6"printMe( ) method for DEBUG. This should simply print the value in toString( ).Write a class (NOT A SUBCLASS) DicePairYI with a 2 element array of type DiceYI.Default constructor: Use Random class methods to initialize each DiceYI Constructor with a parameter for the initial face values. Validate that it allows only 1..6.Accessor getValue( i ) which returns the value of the first or second DiceYI. Accessor getTotal( ) which returns the sum the array DiceYI face values.Mutators setValue( i ) to set value. Let DiceYI validate it only sets 1..6 Mutator roll( ) which randomizes each DiceYI in the arraytoString( ) method to return a string like "3, 4" or "6, 5"equals( ) method to compare a pair of dice with another pair of dice. Return true if they have the same face values. For example if one DicePairYI object has 4,6 and the other has 6,4 they are equal.printMe( ) method for DEBUG. This should simply print the value in toString( ).Write a client DiceGame1YOURNAME.Instantiate and initialize a pair of diceInstantiate score, a 20 element integer array of integers and initialize it to all 0.Write a play( ) method for a new game, it should reset the game and then continuously roll the dice until you win or lose or the array is full.Each roll is entered in the array until you win, lose, or the array is full.Write a printArray( ) method to print the score array on ONE line. Make it easy to read by adding a " - " after every 5 scores e.g. 4 8 9 8 5 - 7 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 The rules of the game: A player rolls the two dice and adds the number shown on them.Roll the two dice up to 20 times and save the total in the array.If the total is 7 or 11, you win. Put this in the array, report the results and exit the game.If the total is 2, 3, or 12, you lose. Put this in the array, report the results and exit the game.If the total is anything else, save the total as the "goal". put it in the array, and you get to roll again.The new objective is to roll the same total as the "goal".You keep rolling until you either get "goal" or a 7. Show the array.If you roll "goal", you win. Put this in the array, report the results and exit the game.If you roll a 7, you lose. Put this in the array, report the results and exit the game.Sample Terminal:You win: 10 10 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You win: 7 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You win: 8 11 8 0 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You lose: 6 3 3 7 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You lose: 4 5 5 12 9 - 6 6 7 0 0 - 0 0 0 0 0 - 0 0 0 0 0 You win: 8 8 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0 - 0 0 0 0 0
Earn money selling
your Study Documents