2011-10-07, 12:38 AM
Fiel Wrote:range(1, 50) creates a range from [1, 50)
Here's a more Python noob-friendly way of doing it.
Code:import random
randomNumbers = []
while len(randomNumbers) < 6:
randomNumber = random.randint(1, 49)
if randomNumber not in randomNumbers:
randomNumbers.append(randomNumber)
for eachRandomNumber in randomNumbers:
print(str(eachRandomNumber) + " ")
Yeah, that'll probably make my teacher less hard, thus less suspicious. Looks like something I would come up with, thanks Fiel

