def threshold(self, attempt):
    threshold_calc = (400 - (attempt * attempt))
    if (threshold_calc < 300):
        return 300
    return threshold_calc
def threshold(self, attempt):
    threshold_calc = (400 - (attempt * attempt))
    if (threshold_calc < 300):
        return 300
    return threshold_calc