Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuiteDiscussions Q&R
UI DESIGNER CODING
1 Vote
1 RéponseI 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 Vote
4 RéponsesHow to do this?
1 Vote
1 RéponseAujourd'hui en vedette
Questions
0 Votes
Remove from a slice of a list
1 Votes
Why it's giving error
1 Votes
HTML CSS - Filter: brightness()
0 Votes
Need help pls
1 Votes
Questions
0 Votes
python courses
0 Votes