Home>
def rpstr (num, str = "*"):
for i in range (1, num + 1):
print (str, end = "")
str = input ("Enter a string.")
num = int (input ("Please enter the number."))
rpstr (num, str)
code

Problem: Create a function rpstr (num, str = "*") that repeatedly displays the specified number of strings. The default character string is "*".

Execution result:
Please enter a character string. Yes.

Please enter the number. Five
There is a character string ---
Yes. Yes. Yes. Yes. Yes.
No string ---


I want to display it like this.