logo CodeStepByStep logo

print_strings

Language/Type: Python for

Write a function named print_strings that accepts a string and a number of repetitions as parameters and prints that string the given number of times with a space after each time. For example, the call of print_strings("abc", 5) should print the following output:

abc abc abc abc abc
Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.