-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigros.py
More file actions
40 lines (27 loc) · 766 Bytes
/
migros.py
File metadata and controls
40 lines (27 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 7 18:23:09 2021
@author: fxc
"""
import random
import string
import math
import numpy as np
import pandas as pd
list_nbr_tirage = list()
for _ in range(100000):
billes = list(string.ascii_uppercase)[0:4]
check = list(string.ascii_uppercase)[0:4]
tirage = list()
while len(check) != 0 :
new_bille = random.choice(billes)
if new_bille in check :
check.remove(new_bille)
tirage.append(new_bille)
list_nbr_tirage.append(len(tirage))
df_nbr_tirage = pd.DataFrame(list_nbr_tirage)
df_nbr_tirage.plot.density()
mean = df_nbr_tirage.mean()
maxi = df_nbr_tirage.max()
mini = df_nbr_tirage.min()