Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import itertools
- def probability(wuerfel, zahl):
- prob = 0
- for i in itertools.product(np.arange(1, 7), repeat=wuerfel):
- if sum(i) == zahl:
- prob += 1
- return prob / 6**wuerfel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement