QuantEcon / lecture-source-py

Source files for "Lectures in Quantitative Economics" -- Python version
BSD 3-Clause "New" or "Revised" License
191 stars 77 forks source link

functions_issue2 #931

Closed sayaikegawa closed 4 years ago

sayaikegawa commented 4 years ago

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.