0% found this document useful (0 votes)
93 views2 pages

Write Python Program To Adding Grades To Students at The End of The Year

This document outlines a Python program to calculate student grades at the end of the year. It instructs to ask the student for their number, tutorial mark, and test mark to calculate an average. If the average is below 40%, automatically assign an F grade. Otherwise, ask for the exam mark to calculate the final mark based on weights for each component and assign a letter grade based on the final score.

Uploaded by

aungnaingoo44
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views2 pages

Write Python Program To Adding Grades To Students at The End of The Year

This document outlines a Python program to calculate student grades at the end of the year. It instructs to ask the student for their number, tutorial mark, and test mark to calculate an average. If the average is below 40%, automatically assign an F grade. Otherwise, ask for the exam mark to calculate the final mark based on weights for each component and assign a letter grade based on the final score.

Uploaded by

aungnaingoo44
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Write Python program to adding grades to students at the end of the year.

i) Ask for a student number


ii) Ask for the student’s tutorial mark
iii) Ask for the student’s test mark.
iv) Calculate whether the stduent’s average so far is high enough for the student to be
permitted to write the examination. If the average (mean) of the tutorial and test marks
is lower than 40%, the student should automatically geta F grade, and the program
should print the grade and exit without performing the following steps.
v) Ask for the student’s examination mark
vi) Calculate the student’s final mark. The tutorial and the test marks should count for the
25% of the final mark each, and the final examination should count for the remaining
50%.
vii) Calculate and print the student’s grade , according to the following table.

Weighted final score

80 <= mark <= 100 A

70 <= mark < 80 B

60<= mark < 70 C

50 <= mark < 60 D

Mark < 50 E

PSEUDOCODE

SEND ‘ Please enter student number’ TO DISPLAY

RECEIVE studentnumber FROM KEYBOARD

SEND ‘ Please enter student tutorial mark’ TO DISPLAY

RECEIVE tutorialmark FROM KEYBOARD

SEND ‘ please enter student’s test mark’ TO DISPLAY

RECEIVE testmark FROM KEYBOARD


SET average TO (tutorialmark + testmark)/2

IF average < 40 THEN

SEND ‘F’ TO DISPLAY

ELSE

IF average > 40 THEN

SEND ‘Please enter examination mark’ TO DISPLAY

RECEIVE exammark FROM KEYBOARD

You might also like