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
Return
0 Votes
Why doesn't this work?
1 Votes
Code coach problem
0 Votes
How store the users data
0 Votes
How to send code output to other
0 Votes
How do I start c#
1 Votes