Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. Test Scores. Write Test a program that stores a set of random test grades and produces the following output. your program several times with

image text in transcribed
5. Test Scores. Write Test a program that stores a set of random test grades and produces the following output. your program several times with a class which has a low, medium, and high variance of scores. Note: Your main () should be very streamlined with no loops Gust function calls). Number of students: 20 Scores: 81 87 74 80 99 74 88 88 92 84 75 75 71 97 71 81 95 72 97 76 Average: 82.8 Standard Deviation: 9.21 Number of A grades: 5 A Grades: 99 92 97 95 97 Index of A Grades: 4 8 13 16 18 lore 6. DNA. Suppose we are interested in studying a DNA sequence which consists of four bases: A, C,G and T. For example: TGCGTGCTACCACATCATGCAGTTTT (a) Write a function of the form void setupRandDNASeq(int n, char random string of length n. Hint: remember to terminate the string with 1o" dna) which creates a b) Write a function of the form int getBaseCount (char dna(], char base), where dna[ is a DNA string and base is a single character. The function returns how many times base occurs in the string. For example, in the above string, 'T' occurs 10 times. Note: here, you don't have to pass in the dimension because you can get it from the strlen function. (c) Write a function called void getAl1BaseCounts (char dna(l, int baseCountArray[]) that computes the statistics of how many times each base occurs in dna [1.Here, baseCountArray[] will be a 4-dimensional array containing the counts for A, C, G and T. (d) Write a function called printstats (char dna, int baseCountArray]) that takes in the DNA string and the 4-dimensional array of base counts and prints the percentages to the screen: Sequence: TGCGTGCTACCACATCATGCAGTTTTCAAAGAAGAAAGCCTCACCACAAA Length: 50 Base Statistics A: 26.4 C: 44.1 G: 34.8 T: 13.6 (e) Write a function of the form void blankout (char dna[], char base, char dotstr1) which given a DNA string creates a new string by blanking out (convert to ) any character other than the specified base. For example, suppose base 'T', then the following string will be created. dna: TGCGTGCTACCACATCATGCAGTTTTCAAAGAAGAAAGCCTCACCACAAA (0 Write void displayA11Blankout (char dna[]) which displays all 4 blank out strings 14

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

2. Contrast applied research and basic research.

Answered: 1 week ago

Question

Write the difference between sexual and asexual reproduction.

Answered: 1 week ago

Question

What your favourite topic in mathematics?

Answered: 1 week ago

Question

Briefly describe vegetative reproduction in plants.

Answered: 1 week ago