... | ... | @@ -274,17 +274,6 @@ def one_flip(p): |
|
|
Now what about the return? We know that `bool` means a `true` or `false`. Which
|
|
|
one do I get for heads? Let us add an `@return`.
|
|
|
|
|
|
```c++
|
|
|
/**
|
|
|
* Simulate a single coin flip.
|
|
|
*
|
|
|
* @param p probability of heads
|
|
|
*
|
|
|
* @return true if the result is heads and false if the result is tails
|
|
|
*/
|
|
|
bool one_flip(double p);
|
|
|
```
|
|
|
|
|
|
```python
|
|
|
def one_flip(p):
|
|
|
"""
|
... | ... | |