Hi @jstac , I found that Exercise 3 problems and solution has a contradiction.
Although the problem asks If a head occurs" k or more times" within this sequence, pay one dollar, solution answers If a head occurs" k times" within this sequence, pay one dollar.
So I chose the latter case, but if you prefer the former case, please tell me.
And in the solution I think there is a mistake. especially, in "count = count + 1 if U < 0.5 else 0", this "If...else" affects "count +1" not 1. So, count cannot calculate correctly. I also changed an indentation.
Hi @jstac , I found that Exercise 3 problems and solution has a contradiction. Although the problem asks If a head occurs" k or more times" within this sequence, pay one dollar, solution answers If a head occurs" k times" within this sequence, pay one dollar. So I chose the latter case, but if you prefer the former case, please tell me.
And in the solution I think there is a mistake. especially, in "count = count + 1 if U < 0.5 else 0", this "If...else" affects "count +1" not 1. So, count cannot calculate correctly. I also changed an indentation.