input="" while input == "": input = raw_input("How many students' grades do you want to calculate?") count = int(input) for i in range(count): total = 0 name = "" while name == "": name = raw_input("Enter the student's name: ") print "Enter the student's exam grades" examTotal = 0 for i in range(3): grade = "" while grade == "": grade = raw_input("Exam "+ str(i+1) + " score: ") examTotal += float(grade) total += .6 * examTotal / 3 print "Enter the student's assignment grades" assignmentTotal = 0 for i in range(4): grade = "" while grade == "": grade = raw_input("Assignment "+ str(i+1) + " score: ") assignmentTotal += float(grade) total += .4 * assignmentTotal/4 print name + "'s total grade is " + str(total)