# -*- coding: utf-8 -*-
"""
Created on Wed Jun 04 01:21:31 2014

@author: Administrator
"""

class Analysis:
    def processExamResults(self):
        passes = 0
        failures = 0
        studentCounter = 1
        
        while(studentCounter<=10):
            result = input("Enter result( 1 = pass, 2 = failure ):")
            
            if(result == 1):
                passes = passes + 1
            else:
                failures = failures + 1
            
            studentCounter = studentCounter + 1
            
        print 'Pass: ', passes
        print 'Failure: ', failures
        
        if(passes>= 8):
            print 'Raise tuition!\n'

myAnalysis = Analysis()
myAnalysis.processExamResults()

 

posted on 2014-06-04 01:36  cpycpp  阅读(187)  评论(0)    收藏  举报