0

This really confusing and I would love to know the solution

Given the code above, output the input x repeated y times. Sample Input: awesome 3 Sample Output: awesomeawesomeawesome https://code.sololearn.com/cXo2LASgjDoT/?ref=app

21st Jul 2021, 3:06 PM
TheSillyGoose 1
TheSillyGoose 1 - avatar
3 Réponses
+ 1
Multiplication of a string and integer results in integer number of strings concatenated together (atleast in python )
21st Jul 2021, 3:24 PM
Abhay
Abhay - avatar
+ 1
Ok thank you line 3 I knew forgot to put that line 5 was the thing i didn't know thank very much
21st Jul 2021, 4:51 PM
TheSillyGoose 1
TheSillyGoose 1 - avatar
+ 1
TheSillyGoose 1 There is no confusion. input function by default returns string so if you mulitply number with String then that string would be concatenate that number's time. So convert input function to integer with int function.
21st Jul 2021, 5:28 PM
A͢J
A͢J - avatar