Multiplication program
Question: I am making this multiplication program in python 2.7.5 for my sister, and I
don't know how to count the correct answers. Here is the code:

    
    
    import easygui
    for i in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:
        answer = easygui.enterbox("What is " + str(i) + ' times 8?')
        if int(answer) == i * 8:
            easygui.msgbox("That is correct!")
        else:
            easygui.msgbox("Wrong!")
    


Answer: Why not just add a variable to keep count for you?

    
    
    import easygui
    correct_answers = 0 # start with none correct
    for i in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:
        answer = easygui.enterbox("What is " + str(i) + ' times 8?')
        if int(answer) == i * 8:
            easygui.msgbox("That is correct!")
            correct_answers += 1 # increment
        else:
            easygui.msgbox("Wrong!")
    

You could improve your program by making the base number a variable, too, and
using Python's `str.format()` rather than addition:

    
    
    base = 8
    ...
        answer = easygui.enterbox("What is {0} times {1}?".format(i, base))
        if int(answer) == i * base:
            ...
    

