To print "BBBBB" from the given variable letter = "B"
, the correct line of code would be:
print(letter * 5)
This line multiplies the string "B" by 5, resulting in "BBBBB".
The other options do not print "BBBBB":
print(letter)
will print "B".print5("letter")
andprint5("letter")
are not valid as there is no function namedprint5
.print("letter" * 5)
will print "letterletterletterletterletter" instead of "BBBBB".
So, the correct answer is:
print(letter * 5)