Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii-Silenko committed Oct 24, 2023
1 parent 9ece647 commit 94c29bc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# write your code here
import random


def flip_coin() -> dict:
flip_data_set = [[random.randint(0, 1) for _ in range(10)]
for _ in range(10000)]
data_set_analyzed = {key: len(
[key_value_set for key_value_set in flip_data_set
if sum(key_value_set) == key]
) / len(flip_data_set) * 100 for key in range(11)}

return data_set_analyzed

0 comments on commit 94c29bc

Please sign in to comment.