Logo Search packages:      
Sourcecode: uligo version File versions  Download package

def uligo::PbmRecord::printStatistics (   self  ) 

Returns some statistics on the problems asked so far.

Definition at line 263 of file uligo.py.

00263                              :
        """ Returns some statistics on the problems asked so far."""
        if self.pbmsAsked:
            rightPercentage = ' (' + str(self.noRight*100/self.pbmsAsked) + ' % )'
            wrongPercentage = ' (' + str(100 - (self.noRight*100/self.pbmsAsked) ) + ' % )'
        else: rightPercentage = wrongPercentage = ''
        return    'Number of problems in database: ' + str(self.noOfPbms) +'\n' \
               +  'Number of questions asked     : ' + str(self.pbmsAsked) +'\n' \
               +  'Number of right answers       : ' + str(self.noRight) \
                      + rightPercentage + '\n' \
               +  'Number of wrong answers       : ' + str(self.noWrong) \
                      + wrongPercentage + '\n' \


    def store(self, correct):


Generated by  Doxygen 1.6.0   Back to index