I’m a Java guy and I just can’t convince myself to learn a new language – because there isn’t a better one. Let’s look at python for a second, there is visually no structure. Why is having {} blocks a problem?

[python]
#!/usr/bin/python3

# Imports
import random

s1 = "Let’s predict the next mark six!"
print(s1)

genEntries = 4
sysRandom = random.SystemRandom()

while genEntries > 0:
genNumbers = 17
selection = []
result = []
# first fill selection array with 17 random numbers
while genNumbers > 0:
temp = sysRandom.randint(1, 49)
if temp not in selection:
selection.append(temp)
else:
continue
genNumbers -= 1
# then pick 6 numbers from selection
result = sysRandom.sample(selection, 6)
result.sort()
print(result)
genEntries -= 1

"""
Let me know if you win with this script!
"""
[/python]

Leave a Comment