New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
Non repeated random numbers
0 Votes
2 Answersis there anything wrong in this please answer
import string
from random import *
letters = string.ascii_letters
digits = string.digits
chars = letters + digits
min_length = 9
max_length = 15
password = "".join(choice(chars) for x in range(randint(min_length, max_length)))
print(password)
1 Vote
4 AnswersPlease help!!
-1 Vote
7 Answers
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 Votes
4 AnswersError in random function
0 Votes
4 AnswersHot today
Help pls/ python
1 Votes
C++ students' scores program
1 Votes
How to remember what you learned
1 Votes
Find saved code
0 Votes
I want a little help.
0 Votes
Projects not Working
3 Votes
React course
0 Votes
What is the output of this code?
0 Votes