I'm trying to make a Pick 3 lotto
in Python. Show me some example codes.
Ball 1:
0x Hit 1,8,9
1x Hit 2,3,4,7
2x Hit 0,5,6
Ball 2:
0x Hit 5,9
1x Hit 0,2,4,6,8
2x Hit 1,3
Ball 3:
0x Hit 0,2,9
1x Hit 4,6,7,8
2x Hit 1,3,5
What have you done so far?
# My example Pick 3
void randomfunc(int chkodds)
{
if (chkodds == 1) goto checkodds;
if (chkodds == 2) : odds = 1
if (chkodds == 3) : odds = 100
if (chkodds == 4) : odds = 1
checkodds:
## check odds of winning
chk_odds=random.randint(*4)
## odds of winning
odds=random.randint(*3)
void randomfunc(int odds)
{
if (odds == 1) goto checkodds
IF (odds == 100) goto checkodds
IF (odds == 1000) goto checkball
checkball:
num=random.randint(*4)
IF (num == 0) goto checkodds
IF (num == 1) goto ball1
IF (num == 2) goto ball2
IF (num == 3) goto ball3
ball1:
lroller=random.randint(*3)
IF (lroller == 0) : a = [1]
IF (lroller == 1) : a = [8]
IF (lroller == 2) : a = [9]
xroller=random.randint(*4)
IF (xroller == 0) : a = [2]
IF (xroller == 1) : a = [3]
IF (xroller == 2) : a = [4]
IF (xroller == 3) : a = [7]
yroller=random.randint(*3)
IF (yroller == 0): a = [0]
IF (yroller == 1): a = [5]
IF (yroller == 2): a = [6]
print ('a')
import os
os.system("pause")
GOTO checkodds
}
Please post all code, output and errors between the appropriate code tags. Refer to the
Help / Rules document on BBCode on how to properly post code. When Larz60+ asked you what you have tried, he means, what have you tried in Python. This is, after all, a Python forum.
(Aug-28-2017, 11:28 AM)Python3 Wrote: [ -> ]# My example Pick 3
void randomfunc(int chkodds) {
if (chkodds == 1) goto checkodds;
That's not python. We're not going to translate it for you, lol