Python exercises (for loops and if statements)