Question

In: Computer Science

Using python code Developed a program to get students homework, midterm, and final exam grades and...

Using python code

Developed a program to get students homework, midterm, and final exam grades and compute their average grades display average grade as a number and give them letter gardes. For this homework, I would like you to modify your to do the following.

Student grades MUST be between 0 and 100. If students input any number that is not in this range , program must keep asking to enter the correct number. Once student input correct grade, program should move on to next grade.

For example if a student had an average grade of 90, and student name is Alex Smith, the course code is CSCI1012, the program must display:

Student Name: Alex Student Last name : Smith Course: CSCI1012 Student Average grade: 90 Student final grade : A

Solutions

Expert Solution

Code: --

first=input('enter your first name: ') #taking input from user for firstand last name and course name
last=input('enter your last name: ')
course=input('enter your course name: ')
while True:# take input valid marks
    ho=input('enter homework marks out of 100 : ')
    if not ho.isdecimal() or int(ho)<0 or int(ho)>100: # validate marks if not in 100 then retake
        print('enter valid marks : ')
        continue
    else: # if valid then go for next mark
        break

while True:
    mid=input('enter mid marks out of 100 : ') # validate marks if not in 100 then retake
    if not mid.isdecimal() or int(mid)<0 or int(mid)>100:
        print('enter valid marks : ')
        continue
    else: # if valid then go for next mark
        break
while True:
    fin=input('enter final marks out of 100 : ')# validate marks if not in 100 then retake
    if not fin.isdecimal() or int(fin)<0 or int(fin)>100:
        print('enter valid marks : ')
        continue
    else: # if valid then go for next mark
        break
avr=((int(ho)+int(mid)+int(fin))/3) # calculating avr marks
# printing studnet details
print("Student's first name:", first)
print("Student's last name:", last)
print("Course name:", course)
print("Average grade:",avr)

# printing gread according to avrage marks
if avr<101 and avr>90:
    print("Student final grade : A")
elif avr<91 and avr>80:
    print("Student final grade : B")
elif avr<81 and avr>70:
    print("Student final grade : C")  
elif avr<71 and avr>60:
    print("Student final grade : D")  
else :
    print("Student final grade : E")  

OUTPUT:__


Related Solutions

1. The following lists midterm and final exam grades for randomly selected students: Midterm (x) 82...
1. The following lists midterm and final exam grades for randomly selected students: Midterm (x) 82 65 93 70 85 50 95 80 Final (y) 94 77 94 79 95 70 97 91 a). Plot the scatter diagram. b). find the value of the linear correlation coefficient r. c). find the equation of the regression line that best fits the data. d). If you received a 76 on the midterm, what grade could you expect on the final? e). If...
Using the accompanying Student Grades​ data, construct a scatter chart for midterm versus final exam grades...
Using the accompanying Student Grades​ data, construct a scatter chart for midterm versus final exam grades and add a linear trendline. What is the​ model? If a student scores 70 on the​ midterm, what would you predict her grade on the final exam to​ be? Student Midterm Final Exam 1 7575 6464 2 8585 9090 3 8080 6969 4 8989 8484 5 7676 6161 6 6666 7878 7 7878 7272 8 9494 9494 9 6767 5959 10 9393 8686 11...
An investigator collected data on midterm exam scores and final exam scores of elementary school students;...
An investigator collected data on midterm exam scores and final exam scores of elementary school students; results can summarized as follows. Average SD -------------------------------------------------- Boys' midterm score 70 20 Boys' final score 65 23 girls' midterm score 75 20 girls' final score 80 23 The correlation coefficient between midterm score and final score for the boys was about 0.70; for the girls, it was about the same. If you take the boys and the girls together, the correlation between midterm...
The following are the midterm exam grades (in %) of a simple random sample of 39...
The following are the midterm exam grades (in %) of a simple random sample of 39 statistical students: 85 64 45 77 53 72 99 59 68 92 48 75 51 93 67 78 89 56 83 71 49 94 63 77 79 88 42 65 92 69 73 56 81 69 61 75 58 67 81 a). make a 75% confidence statement about the mean grade of all statistical students on a similar midterm b). what is the sample...
The grades of a class of 9 students on a midterm report (x) and on the...
The grades of a class of 9 students on a midterm report (x) and on the final examination (y) are as follows:    x 77 50 71 72 81 94 96 99 67 y 82 66 78 34 47 85 99 99 68 Compute a 95% confidence interval for the mean response mu subscript Y divided by x end subscript when x equals 85.
What is the percentage of shared variance between the midterm and final grades in the table...
What is the percentage of shared variance between the midterm and final grades in the table below? Midterm Final 55 100 60 80 78 92 79 95 80 90 55 90 64 40 89 75 90 70 92 82 94 70 100 100 13% 17% 25% Less than 1%
Imagine there are five students in a class. Their scores on the midterm exam are: 93,...
Imagine there are five students in a class. Their scores on the midterm exam are: 93, 85, 70, 78, and 64. Calculate the mean, the variance and the standard deviation and interpret the meaning of the variance and standard deviation.
Create a C++ program that will accept any number of grades for an exam. The grades...
Create a C++ program that will accept any number of grades for an exam. The grades will be input as 4 for an A, 3 for a B, 2 for a C, 1 for a D, and 0 for an F. After all grades have been entered, allow the user to enter -1 to exit. Output the number of grades in each category. Using arrays.
A researcher was interested in the anxiety present in students just prior to the midterm exam....
A researcher was interested in the anxiety present in students just prior to the midterm exam. The research used an anxiety self-quiz to gage the student's anxiety. The score for 30 students are: 69,61,84,99.66.86.91.94,54,66,77,48, 70,70,86,98.56,43,70,88,78,53,85, 40,86,79,58,40,89,70. 1. Construct a frequency table with class, frequency, relative percent and cumulative percent that has 6 classes to describe the distribution of the data. 2. Use the frequency table to construct a histogram. 3. Calculate the numerical descriptive statistics mean, median, standard deviation, and...
The grades of a group of 1000 students in an exam are normally distributed with a...
The grades of a group of 1000 students in an exam are normally distributed with a mean of 70 and a standard deviation of 10. A student is randomly selected from the group. Find the probability that; a. Their grade is greater than 80 b. Their grade is less than 50 c. That their grade is between 50 and 80 d. Approximately, how many students have grade greater than 80% and how many have less than 50%
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT