Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
your_cash = int(input('how much cash do you have?\n> ').replace(',',''))

current_cash = your_cash

bad_streak = 8


for s in range(1, 10000):
	streak = 0
	starting_cash = s
	current_cash = your_cash
	chance = 100

	while current_cash > 0:
		current_cash = your_cash
		current_cash -= starting_cash
		streak += 1
		starting_cash *= 2
		chance /= 2
	if streak <= bad_streak:
		break

print('Highest:', s)
print(f'{chance}% that you will lose all your money')
i = s
for _ in range(bad_streak):
	print(i)
	i *= 2


# starting_cash = 9

# chance = 100
# for _ in range(bad_streak):
# 	chance = chance / 2
# 	current_cash -= starting_cash
# 	starting_cash *= 2
# print(f'{chance}% that you will get a bad streak')
# print(current_cash, 'end cash')