-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgrades.py
66 lines (54 loc) · 1.53 KB
/
grades.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#function that gets the course data and returns the course raw grade
counter =0
def course_data():
if counter == 0:
name=raw_input("Name: ")
course=raw_input("Course: ")
course_unit=raw_input("course_unit1: ")
counter=counter+1
grade=raw_input("Course Grade: ")
computed_grade(grade)
#function that gets the computed grade (logic)
def computed_grade(grade):
print("Intial Grade value: {0}".format(grade))
if grade=="A":
grade=6
elif grade=="B":
grade=5
elif grade=="C":
grade=4
elif grade=="D":
grade=3
elif grade=="E":
grade=2
elif grade=="O":
grade=1
elif grade=="F":
grade=0
else:
course_data()
course_data()
# n=course_data()
# computed_grade(n)
# #grades were enterd wrong lets terminate the progra
#out putting computed Grade
# print("Your grade is {0}".format(grade))
# #determining performance
# if grade >= 4:
# print("good performance")
# elif grade >=2 and grade < 4:
# print("average score")
# else:
# print("poor performance")
# def average(total,summation_subs):
# avg=total/summation_subs
# print("Average is :%f"%avg)
# total_grade = 0
# #entering in scores 3 times
# for i in range(0,2):
# grade=course_data()
# print("Grade in call {0}".format(i))
# total_grade=grade+total_grade
# print("Total Grade is currently {0}".format(total_grade))
# #getting average
# average(total_grade,3)