Answer: Python Puzzler #503

The answer is C. The program prints:

BB
EE
EE
PP
What the program prints
Checked by running the program for real.

Why?

A for loop can go through a string one letter at a time. Each letter is printed 2 times in a row.

Trace table

A trace table follows the program step by step. Here’s this one:

letterprinted
BBB
EEE
EEE
PPP

The code again

for letter in "BEEP":
    print(letter * 2)

Try it: change one number in the program and predict the new output before you run it.