Question: in python Assignment: Write a function print _ repeat that takes a string and an int parameter. If the int is a positive number, print
in python Assignment: Write a function printrepeat that takes a string and an int parameter. If the int is a positive number, print the string that number of times. Otherwise, the function should do nothing. The
function should return no value.
For example, printrepeat should print asterisks
You are not allowed to use a list comprehension, the string repetition operator or any loop. The function should recursively call itself.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
