Question

In: Computer Science

You're a statistics professor and the deadline for submitting your students' grades is tonight at midnight....

You're a statistics professor and the deadline for submitting your students' grades is tonight at midnight. Each student's grade is determined by their mean score across all of the tests they took this semester.

(The mean is the average of the numbers. It is easy to calculate: add up all the numbers, then divide by how many numbers there are)

You've decided to automate grade calculation by writing a Python program that takes a list of test scores and prints a one character string representing the student's grade calculated as follows:

90% <= mean score <= 100%: "A",
80% <= mean score < 90%: "B",
70% <= mean score < 80%: "C",
60% <= mean score < 70%: "D",
mean score < 60%: "F"

For example, if list1 = [92, 94, 99], it would print "A" since the mean score is 95, and if list1 = [50, 60, 70, 80, 90], it would return "C" since the mean score is 70.

Solutions

Expert Solution

def printGrade(scores):

  avg=0

  #iterating the list

  #finding sum

  for x in scores:

    avg+=x

  #finding the average

  avg=avg/len(scores)

  #checking average to print grade

  if(avg>=90):

    print("A")

  elif(avg>=80):

    print("B")

  elif(avg>=70):

    print("C")

  elif(avg>=60):

    print("D")

  else:

    print("F")

printGrade([92,94,99])

printGrade([50,60,70,80,90])

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me


Related Solutions

A statistics professor at a large university hypothesizes that students who take statistics in the morning...
A statistics professor at a large university hypothesizes that students who take statistics in the morning typically do better than those who take it in the afternoon. He takes a random sample of 36 students who took a morning class and, independently, another random sample of 36 students who took an afternoon class. He finds that the morning group scored an average of 72 with a standard deviation of 8, while the evening group scored an average of 68 with...
Statistics grades: In a statistics class of 47 students, there were 17 men and 30 women....
Statistics grades: In a statistics class of 47 students, there were 17 men and 30 women. Three of the men and four of the women received an A in the course. A student is chosen at random from the class. (a) Find the probability that the student is a woman. (b) Find the probability that the student received an A. (c) Find the probability that the student is a woman or received an A. (d) Find the probability that the...
A professor at a local community college noted that the grades of his students were normally...
A professor at a local community college noted that the grades of his students were normally distributed with a mean of 74 and a standard deviation of 10. The professor has informed us that 6.4 percent of his students received A's while only 2.5 percent of his students failed the course and received F's. What is the minimum score needed to earn an A? Enter your answer rounded to one decimal place.
Statistics Class Times A professor wishes to see if students show a time preference for statistics...
Statistics Class Times A professor wishes to see if students show a time preference for statistics classes. A sample of four statistics classes shows the enrollment. At =α0.01, do the students show a time preference for the classes? Use the P-value method with a TI-83 Plus/TI-84 Plus calculator. Time :800AM :1000AM :1200PM :200PM Students 22 35 29 26
A large group of students took a test in Statistics and the final grades have a...
A large group of students took a test in Statistics and the final grades have a mean of 70 and a standard deviation of 10. If we can approximate the distribution of these grades by a normal distribution, what percent of the students a) scored between 50 and 90? b) scored higher than 90? c) should pass the test (grades≥50) d)non of the above d) should fail the test (grades<50)?
A sample of 10 students was selected from a large statistics course. The grades of the...
A sample of 10 students was selected from a large statistics course. The grades of the 10 students on their test are shown below: 94 61 96 66 92 68 75 85 84 78 3a. Create a histogram, with the first class being 60-69. (3 pts) 3b. Calculate the following for the above data. Please only report the results. (8 pts) Mean = _____ Median = _____ Mode = _____ Range = ____ 3c. Calculate the standard deviation for the...
To calculate grades in her statistics course, Professor Clark converted the raw scores on all four...
To calculate grades in her statistics course, Professor Clark converted the raw scores on all four exams to z-scores. Each student’s final course grade was then based on his or her highest z score. Sara’s raw scores are shown below along with the mean and standard deviation for each of the four exams. Exam Raw Score mean stDev 1 50 45 10 2 30 30 10 3 25 20 2 4 25 20 3 Which exam did Sara do the...
A professor claims the Mallard grades for students average 93. He takes a random sample of...
A professor claims the Mallard grades for students average 93. He takes a random sample of 10 scores to test his claim—the scores are: 89 100 95 91 92 99 80 94 100 88 Assuming the grades are normally distributed, is there enough evidence to believe that the average is less than 93 at the .05 level of significance? (Round to 4 Decimal Places) 1. Is the test statistic for this test Z or t? 2. What is the value...
A statistics professor asked her students whether or not they were registered to vote. In a...
A statistics professor asked her students whether or not they were registered to vote. In a sample of 50 of her students (randomly sampled from her 700 students), 35 said they were registered to vote. Questions 1 - 6 pertain to scenario 1. Question 1 (1 point) Which of the following properly explains the 95% confidence interval for the true proportion of the professor's students who were registered to vote? Question 1 options: a) We are 95 % confident that...
On a statistics test for a class of 40 students, the grades were normally distributed.The mean...
On a statistics test for a class of 40 students, the grades were normally distributed.The mean grade was 74, and the standard deviation was 8. 2. Janis scored 76 on this test. A. What was her z-score for this grade b. What percent of the class scored lower than Janis? c. Approximately how many students in the class scored lower than Janis? 3. The minumum passing grade on this test was 70. Approximately how many students scored lower than 70...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT