bitsnpcs
Hope you don't mind but I managed to adapt your code to the UK Lotto game. It worked great.
Here's the adapted code:
This was great fun and my first attempt at coding.
So, thanks a lot. Or should I say -
Thanks a million!
Mart
UPDATE: For all those familiar with the UK Lotto game, did you spot the output mistake - the bonus number is not chosen by the game player but provides a winning combination/tier just below the jackpot prize. So ignore the generated bonus number and just play the first six generated numbers.
Can bitsnpcs or someone else come up with an improved code?
Hope you don't mind but I managed to adapt your code to the UK Lotto game. It worked great.
Here's the adapted code:
Code:
from random import *
lottochoices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
bonusnumber = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
# Picks 6 lotto numbers from the choices
x = sample (lottochoices, 6)
# Picks your bonus numbers
y = sample (bonusnumber, 1)
print x
print y
print ("You have Options - " "\nDonate a percentage of any wins to your favorite project" "\nDonate the stake instead to your favorite project")
This was great fun and my first attempt at coding.
So, thanks a lot. Or should I say -
Thanks a million!
Mart
UPDATE: For all those familiar with the UK Lotto game, did you spot the output mistake - the bonus number is not chosen by the game player but provides a winning combination/tier just below the jackpot prize. So ignore the generated bonus number and just play the first six generated numbers.
Can bitsnpcs or someone else come up with an improved code?
Still running 3.8 and lovin' it (running 5.0 as a triple boot)