Created
November 23, 2017 11:11
-
-
Save meshileya/921175fe267e1a4c17fa3dd580024d95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the_num = int(raw_input("Enter number of courses ==> ")) | |
total_course_unit=0.0 | |
total_course_grade = 0.0 | |
total_grade_point = 0.0 | |
for a in range (0,the_num): | |
course_code = str(raw_input("Enter the course code ==> ")) | |
course_unit = int(raw_input("Enter the course unit ==> ")) | |
total_course_unit=total_course_unit+course_unit | |
course_grade = int(raw_input("Enter the course grade ==> ")) | |
total_course_grade = total_course_grade + course_grade | |
if(course_grade >= 70 and course_grade <=100): | |
grade_point = 5* course_unit | |
print 'Course grade ==> A' | |
elif (course_grade >= 60 and course_grade <=69): | |
grade_point = 4* course_unit | |
print 'Course grade ==> B' | |
elif (course_grade >= 50 and course_grade <=59): | |
grade_point = 3* course_unit | |
print 'Course grade ==> C' | |
else: | |
grade_point = 0* course_unit | |
print 'Course grade ==> F' | |
total_grade_point = total_grade_point+ grade_point | |
print 'Total Course Unit ==> ', total_course_unit | |
print 'GPA ==> ', total_grade_point/ total_course_unit |
Won't mind seeing your gist as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wow
We can proceed