Exercise: Repetition and Concatenation
Convert integers to strings and create multiple instances of these string representations.
We'll cover the following
Problem statement
In this exercise, you are required to implement the rep_cat
function. You are given two integers, x
and y
, as arguments. Convert them into strings. The string representation of x
should be repeated x
times, and the string representation of y
should be repeated y
times. Finally, concatenate the string resulting from y
to the string resulting from x
, and return the resulting string.
Sample input
Get hands-on with 1400+ tech skills courses.