Question

4) Write an algorithm to take a list of numbers from user and determine the grade...

4) Write an algorithm to take a list of numbers from user and determine the grade for CSCI1320 students. You need to first prompt the user to know how many students are in the class and then take the final scores in a list. After taking the scores, you check which grade the student has got based on the input score stored in the list. If the score is between or 90 and 100 then it’s an ‘A’ grade, if it’s between or 80 to 89 then ‘B’ grade and so on.

Input:

How many scores to input? 5

63 71 95 52 80

Output:

Grade D Score: 63

Grade C Score: 71

Grade A Score: 95

Grade F Score: 52

Grade B Score: 80

Homework Answers

Answer #1

Hey here is answer to your question.

Take Input(number of scores [N])
for each i in 1 to N :
   Take input of score
if score >= 90:
   print "Grade "A" Score: i "
else if 90 > score >= 80:
   print "Grade "B" Score: i "
else if 80 > score >= 70:
   print "Grade "C" Score: i "
else if 70 > score >= 60:
   print "Grade "D" Score: i "
else if 60 > score:
   print "Grade "F" Score: i "

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
3) Write an algorithm to take a list of numbers from user and determine the numbers...
3) Write an algorithm to take a list of numbers from user and determine the numbers divisible by the number 7. You need to first prompt the user that how many numbers s/he wants to input and then take the numbers. After taking the numbers, you check which numbers are divisible by 7 from the list. You need to print the number along with the position of the number. Finally, you need to print how many numbers from the list...
Student Grades Student Test Grade 1 76 62 2 84 90 3 79 68 4 88...
Student Grades Student Test Grade 1 76 62 2 84 90 3 79 68 4 88 84 5 76 58 6 66 79 7 75 73 8 94 93 9 66 65 10 92 86 11 80 53 12 87 83 13 86 49 14 63 72 15 92 87 16 75 89 17 69 81 18 92 94 19 79 78 20 60 71 21 68 84 22 71 74 23 61 74 24 68 54 25 76 97...
A set of final examination grades in an introductory statistics course is normally distributed, with a...
A set of final examination grades in an introductory statistics course is normally distributed, with a mean of 72 and a standard deviation of 9. a) What is the probability that a student scored below 89 on this exam? (Round to 4 decimal places as needed.) b) What is the probability that a student scored between 63 and 95? (Round to 4 decimal places ad needed.) c) The probability is 5% that a student taking the test scores higher than...
In a recent year, grade 8 Washington State public schools students taking a mathematics assessment test...
In a recent year, grade 8 Washington State public schools students taking a mathematics assessment test had a mean score of 281 with a standard deviation of 34.4. Possible test scores could range from 0 to 500. Assume that the scores are normally distributed. a) What is the lowest score that still place a student in the top 15% of the scores? b) Find the probability that a student had a score higher than 350. c) Find the probability that...
In a recent year, grade 6 Michigan State public school students taking a mathematics assessment test...
In a recent year, grade 6 Michigan State public school students taking a mathematics assessment test had a mean score of 303.1 with a standard deviation of 36. Possible test scores could range from 0 to 1000. Assume that the scores were normally distributed. a. Find the probability that a student had a score higher than 295. b. Find the probability that a student had a score between 230 and 305. c. What is the highest score that would still...
Below represent scores on an exam, each entry one score for one student 40 99 59...
Below represent scores on an exam, each entry one score for one student 40 99 59 98 63 63 64 65 67 35 67 67 68 70 71 71 71 46 72 72 60 73 74 74 74 75 97 75 62 76 76 76 76 76 77 57 77 98 77 63 78 78 78 79 79 80 80 80 80 80 81 81 92 81 93 82 82 83 83 83 83 83 83 83 84 84 84...
This is a program and my solution. How many times should I test, if I need...
This is a program and my solution. How many times should I test, if I need full coverage of all possible program flows?  Why? Write a program that prompts the user for a grade (0-100) and, whether the student is a graduate student (Y/N). If the student is a graduate student, their grade is reduced by 10%, because we have a higher expectation for a graduate students in an undergraduate class. The program then computes and prints the letter grade is...
3. A high school teacher wanted to determine the effectiveness of teaching. He gave a pre-test...
3. A high school teacher wanted to determine the effectiveness of teaching. He gave a pre-test at the beginning of class and a post-test at the end of the class to each student to measure improvement. He selected 15 random students and got these results: Pre 60 61 65 71 68 67 65 62 63 68 69 70 65 62 57 Post 80 87 91 97 89 86 85 83 89 93 94 99 92 91 93 Construct a 90%...
In this lab you are to write a program that calculates a student's final grade and...
In this lab you are to write a program that calculates a student's final grade and outputs the final letter grade to the console using functions. Two tests scores and one homework score will be supplied by the user. To calculate the final score assume that the tests are each worth 40% and the homework is worth 20% of the total score. You should implement and use the following two functions: 1) calcFinalScore: This function is a value-returning function whose...
A mathematics achievement test consisting of 100 questions was given to 50 sixth grade students at...
A mathematics achievement test consisting of 100 questions was given to 50 sixth grade students at maple Elementary School. The following data show the number of questions answered correct by each student. 75 48 46 65 71 49 61 51 57 49 84 85 79 85 83 55 69 88 89 55 61 72 64 67 61 77 51 61 68 54 63 94 54 53 71 84 79 75 65 50 45 65 77 71 63 67 57 63...