Question: Step 1: Type this code in the editor window: def repeat(s: str, n: int) -> str: Return s repeated n times; if n is negative,

Step 1: Type this code in the editor window: def repeat(s: str, n: int) -> str: Return s repeated n times; if n is negative, return the empty string. > > > repeat( 'yes' , 4) 'yesyesyesyes' > > > repeat ( 'no' , 0) > > > repeat ( 'no' , -2) > >> repeat ( ' yesnomaybe' , 3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
