Q&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
Font size
0 Votes
Please reply me
1 Votes
Web code
0 Votes
what's wrong with my code?
2 Votes
Mobile
0 Votes
Same question
0 Votes
About SQL application
2 Votes
Help!
0 Votes
python coding
0 Votes