¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuitaSesiones de PyR
Import random
0 Votos
16 RespuestasUnfair challenges
2 Votos
4 RespuestasFor challengers
1 Voto
4 RespuestasLoop repeating program
0 Votos
3 RespuestasUnity animation bugs
1 Voto
1 RespuestaI 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 Votos
4 Respuestas
so although using srand(time(0)) can be used to get truly random numbers, how truly random are they? For example, if one were to call this method at the same time (in this example, if one were to use this command at 51s) each time would the numbers generated be the same???
If so, are the numbers still truly random??
And if this theory is true, how can one generate truly random numbers that cannot repeat based on external variables (e.g., time)?
2 Votos
4 RespuestasEn tendencia hoy
Media on HTML
0 Votes
xampp
0 Votes
Is Sololearn better or Mimo.org?
1 Votes
Code Playground
0 Votes
How to solve this
1 Votes
Java project
0 Votes
Editor HTML
0 Votes