Q&A Discussions
What did I do wrong?
0 Votes
4 AnswersI need to design a recursive function called replicate recurย which will receive two arguments:ย timesย which is the number of times to repeat and dataย which is theย number or stringย to be repeated.
The function should return an array containing repetitions of the data argument.
For instance,ย replicate_recur (3, 5)ย should return [5,5,5].
If the timesย argument is negative or zero, return an empty array. If the argument is invalid,ย raise ValueError.
0 Votes
4 Answersgetting no output
1 Vote
2 AnswersHot today
Using Python on VScode
2 Votes
Python Developer
0 Votes
Wayss
0 Votes
Question
0 Votes
fully dynamic arrays
1 Votes
Guys who tell me
0 Votes