In a modify task you take code that already works and adapt it so that it does something else.
The editor starts you off with a loop that prints the same message over and over:
message = "This is how you get code to repeat."
for counter in range(1, 10):
print(message)
Run it first and count the lines. The range runs from 1 up to but not including 10, so the message appears nine times, not ten.
Change the program so that it outputs the message 20 times instead.
message variable and the print line exactly as they are.range(...).The tests also check your code: the message has to be printed by a for loop
with a single print statement.
There is more than one range that gives you 20 repetitions. range(20) counts
0 to 19 and range(1, 21) counts 1 to 20, and since the counter is never
printed here, either is fine.
Twenty identical lines, each one reading:
This is how you get code to repeat.
Output:
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
This is how you get code to repeat.
The full stop at the end of the message is part of it, so leave it in.
Make sure that you check for the following things:
range(...) are separated by commas.range(1, 20) repeats 19 times.print line is still indented under the for.