I have myself a little challenge tonight. I've tried to come up with the shortest code for the problem below (the code is pretty self explanatory, except determinGrade there which follows the ruleA - 90-100%    B - 80-89%    C - 70-79%    D - 60-69%    F - Below 60%The code has to be PEP8 complient and no imports (std included) are allowed. Tell me if you can shorten the code further.isValidScore = lambda n: 0 <= n <= 100calcAverage = lambda *args: sum(args)/len(args)determinGrade = lambda s: ['F', 'D', 'C', 'B', 'A'][max(0, (min(s, 99)/10)-5)]def getValidScore():    while True:        try:            s = int(raw_input('Input score: '))            if isValidScore(s):                return s        except ValueError:            pass        print('Score has to be an integer in the range 0 to 100')if __name__ == __main__:    scores = [getValidScore() for _ in range(5)]    print('The scores are: ' + str(scores))    print('The average is: ' + str(calcAverage(*scores)))    print('The grade is: ' + determinGrade(calcAverage(*scores)))
Validating and averaging student grades
python;mathematics