Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
lambda function for coin count.
import numpy as np
coin_toss=lambda n=1:n if np.random.rand()<0.5 else coin_toss(n+1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.