In: Computer Science
Special Supplementary Practical Task
Ordinary Level |
Higher Level |
||
A+ |
8 |
1 |
10 |
A |
7 |
2 |
9 |
B |
6 |
3 |
8 |
C |
5 |
4 |
7 |
D |
4 |
U |
0 |
E |
3 |
||
F |
2 |
||
G |
1 |
||
U |
0 |
[20 Marks]
Sample 1
Enter learner’s full names: Joshua Maponga
Enter learner’s gender : Male
Enter subjects followed by symbols :
English 2
Khoekhoegowab 1
Biology B
Chemistry C
Mathematics B
Agriculture A
Dear Mr. Joshua Maponga, you have 38 points in 5 subjects. Congratulations you are eligible for tertiary studies in Namibia.
grades = {
"a+":8, "a":7, "b":6, "c":5, "d":4, "e":3, "f":2, "g":1,
"u":0,
"1":10, "2":9, "3":8, "4":7, "-":0
}
name = input("Enter learner’s full names :")
gender = input("Enter learner’s gender :")
print("Enter subjects followed by symbols :")
subjects = []
points = 0
english_grade = 0
for i in range(6):
sub = input()
temp = sub.split(" ")
subjects.append( temp )
grade = temp[1].lower()
points = points + grades[grade]
if temp[0].lower() == "english":
english_grade = grade
if points>25 and grades[english_grade] >= 3:
print("Dear Mr. {}, you have {} points in 6 subjects.\
Congratulations you are eligible for tertiary studies in
Namibia.".format(name, points))
else:
print("Dear Mr. {}, you have {} points in 6 subjects".format(name,
points))