1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| from random import randrange
cagnotte= input("Quelle est votre cagnotte de depart?")
mise= input("combien voulez-vous miser?")
num= input("Choisir un nombre entre 0 et 49")
x=randrange(49)
while cagnotte>=1:
if num==x:
cagnotte=cagnotte-mise+(mise/2)
print("Felicitation vous avez trouve le bon nombre, vous avez gagne",mise*3,"$")
elif (num%2==0 and x%0==0) or (num%2!=0 and x%0!=0):
cagnotte=cagnotte-mise+(mise/2)
print("Felicitation vous avez gagne",mise/2,"$")
else:
cagnotte=cagnotte-mise
print("Vous avez perdu toute votre mise")
print("Vous avez ete elimine du tournoi") |
Partager