-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathZCasino.py
More file actions
23 lines (23 loc) · 708 Bytes
/
ZCasino.py
File metadata and controls
23 lines (23 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*-coding:UTF-8 -*
from random import randrange
from math import ceil
argentDepart=100
while (argentDepart >0):
print (argentDepart,"$")
mise = input ("how much do you want play?")
mise = int (mise)
caseChoisi = input("on which box?")
caseChoisi = int(caseChoisi)
x= ceil(mise/2)
nbAlleatoire = randrange (50)
caseRouge=nbAlleatoire%2
print ("the nb winner is :", nbAlleatoire)
if (caseChoisi==nbAlleatoire):
argentDepart= argentDepart + mise*3
print("well done! You win", mise*3)
if (caseChoisi%2 == caseRouge):
argentDepart= argentDepart + x
print("well done, is the same color, you win!", x)
else:
argentDepart=argentDepart-mise
print ("not same nb or color\nyou loose...", mise)