I'm starting with 7 credit and a 15x payout
def martingale(current_bet, payout, profit):
lost = 0
x = 1
while True:
lost = lost + current_bet
print "draw %s" %(x)
print "lost %s" %lost
while(((current_bet*payout-lost) + current_bet) < profit):
current_bet = current_bet+1
print "next bet : %s in order to win %s for a profit of %s" %(current_bet, current_bet*payout, current_bet*payout-lost)
x = x + 1
user_choice = raw_input("continue (c) / reset (r) : ")
print "\n"
if user_choice == "r":
return
while True:
print "================================================================"
print "==================- dice martingale calculator -================"
print "================================================================"
current_bet = raw_input("initial_bet : ")
payout = raw_input("payout : ")
profit = raw_input("profit for each draw : ")
martingale(int(current_bet), int(payout), int(profit))
print "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
print "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"