a =int (raw_input('Enter grade: '))
b =int (raw_input('Enter grade: '))
c =int (raw_input('Enter grade: '))
d =int (raw_input('Enter grade: '))
e =int (raw_input('Enter grade: '))
f =int (raw_input('Enter grade: '))
g =int (raw_input('Enter grade: '))
h =int (raw_input('Enter grade: '))
cumalitive = a,b,c,d,e,f,g,h
one = a+b+c+d+e+f+g+h
two = one/len(cumalitive)
GPA='defined'
if two<0 or two>100:
GPA<0
if two>=97 and two<=100:
GPA=4.0
elif two>=93 and two<=96:
GPA=4.0
elif two >=90 and two<=92:
GPA=3.7
elif two>=87 and two<=89:
GPA=3.3
elif two>=83 and two<=86:
GPA=3.0
elif two>=80 and two<=82:
GPA=2.7
elif two>=77 and two<=79:
GPA=2.3
elif two>=73 and two<=76:
GPA=2.0
elif two>=70 and two<=72:
GPA=1.7
elif two>=67 and two<=69:
GPA=1.3
elif two>=65 and two<=66:
GPA=1.0
elif two<65 and two>0:
GPA=0.0
if two>0 and two<=100 and GPA>0:
print '\n'
print 'your grade is'
print two
print 'your gpa is: '
print GPA
else:
print '\n'
print 'not valid grades'
it's only able to input 8 grades right now, but i will modify it to keep adding raw_Inputs and since 'two' divides by the length of whatever the length of 'cumalitive' is, then it will be really easy.