Questions
IN PSEUDOCODE AND JAVA SOURCE CODE PLEASE: Program 0 (Warm-up, 40 pts): Deoxyribonucleic acid, or DNA,...

IN PSEUDOCODE AND JAVA SOURCE CODE PLEASE:

Program 0 (Warm-up, 40 pts): Deoxyribonucleic acid, or DNA, is comprised of four bases: (G)uanine, (C)ytosine, (A)denine and (T)hymine. Ribonucleic acid, or RNA, is different than DNA in that it contains no Thymine; thymine is replaced with something called (U)racil. For this assignment, you will create an array of 255 characters. You must start by filling the array with random characters of G, C, A and T.   You must then print out the array. Next, replace all the instances of Thymine with Uracil. Finally, you must print out the array again. In your solution, you must write at least one function that contributes to the solution. You must use the length attribute of the array in your answer.

Sample run

CATGGCGTCTTGCCAAGGCGGTTCCTTGTCTTGATGATGGCTGCGAGTTCCGAGTCGCCTTTTCTATGAGTCGCGAAGTATGCGGTCAAATTATGCTTGTCCGCTGTACTAGGCCCACGGATCTCCTCAGACAGCGTCGATGTCGGAATTCGCGGGGAGGAATACTAAACATGCTGAAGTTGATACATGTACAATTGCCGCGAACCAGGTGCACAGGGTGCCCAACGATCCATGTGGAACGAGAGCGATCTAGCC

CAUGGCGUCUUGCCAAGGCGGUUCCUUGUCUUGAUGAUGGCUGCGAGUUCCGAGUCGCCUUUUCUAUGAGUCGCGAAGUAUGCGGUCAAAUUAUGCUUGUCCGCUGUACUAGGCCCACGGAUCUCCUCAGACAGCGUCGAUGUCGGAAUUCGCGGGGAGGAAUACUAAACAUGCUGAAGUUGAUACAUGUACAAUUGCCGCGAACCAGGUGCACAGGGUGCCCAACGAUCCAUGUGGAACGAGAGCGAUCUAGCC

In: Computer Science

What are the essential elements of the design side of a systems SAD?

What are the essential elements of the design side of a systems SAD?

In: Computer Science

Complete a Problem Solving discussion in Word. Your Problem Solving discussion should include Problem Statement, Problem...

Complete a Problem Solving discussion in Word. Your Problem Solving discussion should include Problem Statement, Problem Analysis, Program Design, Program Code and Program Test. For the Program Code section, use Raptor to code

1. Alberta Einstein teaches a business class at Podunk University. To evaluate the students in this class, she has given three tests. It is now the end of the semester and Alberta asks you to create a program that inputs each student’s test scores and outputs the average score for each student and the overall class average. (Hint: The outer loop should allow for Ms. Einstein to input all the students, one by one, and the inner loop should accept the three test scores and compute the average for each student.)

In: Computer Science

ICMP time expired error messages have two meaning? 1.) TTL expired is one reason 2.) what...

ICMP time expired error messages have two meaning? 1.) TTL expired is one reason 2.) what is the other time expired reason? explain fully with an example if possible.

In: Computer Science

C Programming: Write a program that will guess an integer that the user has picked. Imagine...

C Programming: Write a program that will guess an integer that the user has picked. Imagine that the user will write down a positive integer x on a piece of paper and your program will repeatedly ask questions in order to guess what x is, and the user replies honestly. Your program will start by asking for an int n, and you must have 1 ≤ x ≤ n. After that, the program will successively guess what x is, and the user must tell the computer if x is equal to the guess (entering ’e’), larger than the guess (entering ’l’), or smaller than the guess (entering ’s’). Your program will guess by maintaining a lower bound (initially 1) and upper bound (initially n) and pick the largest integer equal to or smaller than1 the midpoint of the lower bound and upper bound. If the user responds with ’l’ indicating that x is larger, the guess becomes the new lower bound plus one. If the user responds with ’s’ indicating that x is smaller, the guess becomes the new upper bound minus one. If the user responds with ’e’ indicating that x is the guess, your program will report the number of guesses made and terminate execution:

Example 1)

Enter n: 50

Is your number 25? l

Is your number 38? l

Is your number 44? s

Is your number 41? e

Your number must be 41. I used 4 guesses.

Example 2) Enter n: 9

Is your number 5? s

Is your number 2? l

Is your number 3? s

Error: that’s not possible.

Example 3)

Enter n: -2

Error: n must be positive.

Example 4)

Enter n: 9

Is your number 5? m

Error: invalid input.

Example 5) Enter n: a

Error: invalid input.

In: Computer Science

uestion 2 Transform the following “C” program into assembly for the 6808 Microcontroller.  Remember when...

uestion 2


Transform the following “C” program into assembly for the 6808 Microcontroller.




Remember when converting this “C” code to follow


best practices


covered in DEF in terms of implementing subroutines in assembly


o


This means that parameters are passed on the stack to subroutines


o


Return values are passed back on the stack


o


You clean up the stack after every use (every subroutine call) to prepare it for the next call


Keep in mind that once your translated this program into assembly – you can step through it to ensure that it behaves correctly and calculates the


expected results.


/* -------------------------------------------------------------


PURPOSE: This program will take 2 operand values and


calculate the sum and difference of the values


------------------------------------------------------------- */


// This function calculates the sum of 2 operands called "A" and "B"


Int


calculateSum(


int


A,


int


B)


{


return


(A + B);


}


// This function calculates the difference between 2 operands by negating B and adding it to A


int


calculateDifference(


int


A,


int


B)


{


return


(calculateSum(A, -B));


// reuse the calculateSum function


}


void


main(


void


)


{


int


firstOperand = 18;


// to be stored at address $80 within the 6808


int


secondOperand = 8;


// to be stored at address $81 within the 6808


int


sum = 0;


// to be stored at address $84 within the 6808


int


difference = 0;


// to be stored at address $86 within the 6808


// call the calculateSum function in order to calculate the total and store it in the "sum" variable


sum = calculateSum(firstOperand, secondOperand);


// call the calculateDifference function in order to calculate the difference and store it in the "difference"

}

please help I need the code in assembly

In: Computer Science

In python, how do I define a function (check_domain) which takes a email (string) and domain...

In python, how do I define a function (check_domain) which takes a email (string) and domain name (string) as input. using slice, it will return true if the email address' domain same matches the input domain name. For example, when input are ”[email protected]” and ”msn.com”, the function you defined should return True. When input are ”[email protected]” and ”hotmail.com”, it should return False

In: Computer Science

java Write method that takes a 2D square array and two integer values that represent the...

java

Write method that takes a 2D square array and two integer values that represent the indices of the two columns. Method swaps the first two columns.

int[][] in = {{1,2,3}, {3,2,4}, {4,2,7}};

would output 213234247

public static void swap(int[][] in, int index1, int index2) {

In: Computer Science

(For C++) Assume that sentence is a variable of type  string  that has been assigned a value ....

(For C++) Assume that sentence is a variable of type  string  that has been assigned a value . Assume furthermore that this value is a string consisting of words separated by single space characters with a period at the end. For example: "This is a possible value of sentence."

Assume that there is another variable  declared , secondWord, also of type  string . Write the statements needed so that the second word of the value of sentence is assigned to secondWord. So, if the value of sentence were "Broccoli is delicious." your code would assign the value "is" to secondWord.

In: Computer Science

List the relational operators recognized by Python, and explain their meanings

List the relational operators recognized by Python, and explain their meanings

In: Computer Science

Explain Business Intelligence in one page or less. Focus upon the concept that ‘BI’ is an...

Explain Business Intelligence in one page or less. Focus upon the concept that ‘BI’ is an umbrella term and explain what the components of a ‘BI’ system are and what its architecture and purpose are.

In: Computer Science

Given the following list of values, perform a binary search for the indicated search item. Use...

Given the following list of values, perform a binary search for the indicated search item. Use the binary search algorithm on pg. 1026 of our textbook. Show the values of first, last and middle, and the number of comparisons made after each iteration of the loop. Your should create a table like the following to show your work, where first and last are the values of the variables at the beginning of the loop, and mid is the midpoint used during that iteration, list[mid] is the value in the list at the midpoint, and No. of key comparisons should be the number of comparisons made during this iteration by the algorithm:

Iteration  first   last    mid  list[mid]   No. of key comparisons
1          0       12      ?    ?           ?

List:
[ 2, 3, 4, 4, 5, 7, 10, 14, 15, 17, 22, 23, 24 ]

Searching for value: 3

In: Computer Science

Language: Python Create a graph and then set initial and goal states such that the number...

Language: Python

Create a graph and then set initial and goal states such that the number of nodes visited for BFS is smaller than that in DFS. Now modify the initial and goal state such that the number of nodes visited for BFS is larger than that in DFS.

In: Computer Science

Write a program, which will act as a simple four-function calculator. That is, it will read...

Write a program, which will act as a simple four-function calculator. That is, it will read a number, read an operator, read another number, then do the operation. The calculator works with integers and uses four functions: +, -, *, and /. After the first operation is completed, the program will read another operator and uses the result of the previous operation as the first value for the next operation. If the user enters either an upper- or lower-case C the result is cleared and then the user starts entering a new number. If the user enters an X, the calculator is turned off. The various input values (i.e. numbers, operators, commands) will be followed by the ENTER key. Your program should prompt the user on what the user is to do. The commands C and X may be entered in place of an operator.

NOTES:

The person using the calculator has a terrible time using a keyboard and may not always enter a valid operator. If this happens the program should ask for another operator. Regardless of the math operation attempted, the program must not die. If the math operation would cause a fatal error in your program you should check for it and issue an error message rather than attempting the operation.

Please write the code for C programming, not C++ or Java

In: Computer Science

USE PYTHON ONLY Please write a Python program to let you or the user play the...

USE PYTHON ONLY

Please write a Python program to let you or the user play the game of rolling a dice and winning/losing money. Initially, you have 100 dollars in your account. You place a bet to roll the dice. The game will be stopped if your bet is zero. First, dealer would roll the dice and get a number from random.randint(1, 6). Then, you would roll the dice and get a number from random.randint(1, 6). Now, compare your number with dealer’s number to see whether you won or lose the bet. If you lose, the bet would be deducted from your account. If you won, the bet would be added to your account. If it’s a tie, your account is not touched. Then, continue the game of putting your bet until your bet is zero. The game is to continue even when you have zero or negative amount of money. You must test your game program 3 times with at least 10 rounds for each game. The output of your test case #1 may like as follows: Welcome to the Rolling Dice Game of TM

1 =============================================. Now, you have 100 dollars to play the game.

2 =============================================. Enter your bet to roll the dice (enter 0 to quit): 10 Dealer got 1 , and you got 5 . You won 10 dollars. Now, you have 110 dollars.

3 =============================================. Enter your bet to roll the dice (enter 0 to quit): 5 Dealer got 5 , and you got 3 . You lost 5 dollars. Now, you have 105 dollars.

4 =============================================. Enter your bet to roll the dice (enter 0 to quit): 30 Dealer got 3 , and you got 3 . It's a tie. Now, you have 105 dollars.

5 =============================================. Enter your bet to roll the dice (enter 0 to quit): 200 Dealer got 3 , and you got 4 . You won 200 dollars. Now, you have 305 dollars.

6 =============================================. Enter your bet to roll the dice (enter 0 to quit): 100 Dealer got 4 , and you got 1 . You lost 100 dollars. Now, you have 205 dollars.

7 =============================================. Enter your bet to roll the dice (enter 0 to quit): 205 Dealer got 2 , and you got 6 . You won 205 dollars. Now, you have 410 dollars.

8 =============================================. Enter your bet to roll the dice (enter 0 to quit): 400 Dealer got 3 , and you got 6 . You won 400 dollars. Now, you have 810 dollars.

9 =============================================. Enter your bet to roll the dice (enter 0 to quit): 500 Dealer got 4 , and you got 1 . You lost 500 dollars. Now, you have 310 dollars.

10 =============================================. Enter your bet to roll the dice (enter 0 to quit): 310 Dealer got 6 , and you got 2 . You lost 310 dollars. Now, you have 0 dollars.

11 =============================================. Enter your bet to roll the dice (enter 0 to quit): 10 Dealer got 3 , and you got 6 . You won 10 dollars. Now, you have 10 dollars.

12 =============================================. Enter your bet to roll the dice (enter 0 to quit): 40 Dealer got 3 , and you got 1 . You lost 40 dollars. Now, you have -30 dollars.

13 =============================================. Enter your bet to roll the dice (enter 0 to quit): 0

14 =============================================. Thank you for playing the Rolling Dice Game of TM

15 =============================================.

In: Computer Science