Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
B0hdanR committed Dec 18, 2024
1 parent 2c420a4 commit 351e2c9
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import random
import matplotlib.pyplot as plt
# import matplotlib.pyplot as plt


def flip_coin() -> dict:
Expand All @@ -9,14 +9,13 @@ def flip_coin() -> dict:
for i in range(11)}
return result_dict


def draw_gaussian_distribution_graph(result_dict: dict) -> None:
x_param = list(result_dict.keys())
y_param = list(result_dict.values())
plt.figure(figsize=(10, 6))
plt.plot(x_param, y_param)
plt.yticks(range(0, 110, 10))
plt.title("Gaussian distribution")
plt.xlabel("Heads count")
plt.ylabel("Drop percentage %")
plt.show()
# def draw_gaussian_distribution_graph(result_dict: dict) -> None:
# x_param = list(result_dict.keys())
# y_param = list(result_dict.values())
# plt.figure(figsize=(10, 6))
# plt.plot(x_param, y_param)
# plt.yticks(range(0, 110, 10))
# plt.title("Gaussian distribution")
# plt.xlabel("Heads count")
# plt.ylabel("Drop percentage %")
# plt.show()

0 comments on commit 351e2c9

Please sign in to comment.