Share your repls and programming experiences

← Back to all posts
Lucky Draw
h
Lost0Soul (59)

I was bored, at home. Wanted to do something. Hope you like it.
Info-
Main Library- Random
I dont think i have anything else.
Please try it out and help me improve.

Commentshotnewtop
Lost0Soul (59)

These motivative comments are what make me make more programs.

Uzalii (437)

It won't be motivating forever(btw nice code keep up the good work) @Tanishqq

Imthebestthe (92)

@Uzalii omg i frocking loved your 'chance of dying to corna' is it acurat tho? it was nice to see the code as well!

Lost0Soul (59)

@Uzalii I can learn till they are, use that knowledge and them motivating again. xD

Uzalii (437)

@Imthebestthe It is around 70 or 80% accurate not 100% tho

Imthebestthe (92)

New bal: 60000000000000000000000000000000000000000000000000000000000000000000000000000000000000
NANI?!?!?!

Imthebestthe (92)

i really enjoyed playing. just wondering why you can only bet 10$ but whatevs

Lost0Soul (59)

@Imthebestthe i kept it 10$ so ppl dont end up winning ridiculous money.

[deleted]

if you bet 0 repl process will die unexpectedly!

lightningrock (48)

You should add code to make it so that you can't go under $0.

ApoorvAgrawal (35)

you dont have to write bal=int("10"), you can just write bal=10

wmlm (0)

You could add/change the possible answers to "wanna play" to Y or N.
In addition create some kind of loop, in case user enters an invalid argument (other than Y or N)

Lost0Soul (59)

@wmlm Ill try to do it. Thannks for the suggestion

AgastyaSandhuja (146)

I used a negative number and won a lot... you should fix it with a greater than/less than code but overall, this is pretty satisfying and addicting

Lost0Soul (59)

@AgastyaSandhuja i dont think that is possible.

Lost0Soul (59)

@AgastyaSandhuja well, it is, maths. (-)×(-)=(+).

AgastyaSandhuja (146)

@Tanishqq

if go_no_go == "YES":
		bet = int(input("How much would you like to bet? : "))
		if bet == 0 or bet > 10 or bet<0:
sugarfi (466)

If you put in a negative bet and lose you get money...

Uzalii (437)

@sugarfi Its saying real process died unexpectedly

sugarfi (466)

@Uzalii that means they called sys.exit

sugarfi (466)

why do you call sys.exit() if the user enters a bad bet? you should make it so it warns them and continues.

imcraft (25)

Hello @Tanishqq,
I made a casino using your code. You should check it out. https://repl.it/talk/share/Casino-in-Python/30843

Lost0Soul (59)

@imcraft I checked it out. Nice Code there

Warhawk947 (509)

why did you upload this twice

Lost0Soul (59)

@Warhawk947 I lost the link, and didn't know how to get it back so yea