Another make task, and this time the user decides how many times the loop repeats.
Write a program that:
Ask each question with its own print, exactly as written below, and read the
answer with a bare input() on the next line. The number has to be wrapped in
int() before range can use it.
The two questions come first, in this order and worded exactly like this:
Please enter string to repeat:
How many times do you want to repeat:
Then the string the user typed, once per repetition, on its own line.
Input:
Hello
3
Output:
Please enter string to repeat:
How many times do you want to repeat:
Hello
Hello
Hello
Input:
Goodbye
10
Output:
Please enter string to repeat:
How many times do you want to repeat:
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
The user is allowed to answer 0, and then the two questions are the whole
output: a loop that repeats zero times prints nothing at all. Your program does
not need to say anything about it.
Ask each question with its own print, and read the answer with a bare
input() on the next line, rather than passing the question to input(...).
The questions are part of the output that is checked here, so their spelling,
capital letters and punctuation count.
Make sure that you check for the following things:
int(). range cannot count with text.print inside the loop prints the string the user typed, not the counter.