The output of the program will be:
HiHiHi
In Python, when you multiply a string by an integer, it repeats the string that many times. So b * 3
will concatenate "Hi" three times, resulting in "HiHiHi".
b = "Hi"
print (b * 3)
(1 point)
Responses
b * 3
b * 3
an error message
an error message
Hi * 3
Hi * 3
HiHiHi
1 answer
The output of the program will be:
HiHiHi
In Python, when you multiply a string by an integer, it repeats the string that many times. So b * 3
will concatenate "Hi" three times, resulting in "HiHiHi".