-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexec.py
25 lines (19 loc) · 823 Bytes
/
exec.py
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
import statistics as stat
import Poisson as P
# VARIABLES
nbRep = 10
taille = 2
nbPoissons = 10
compteur, poissonsRestants, rencontre, deplacements = P.execPoissonAff(
nbRep, taille, nbPoissons, 0.05)
print('Nombre de tours moyen :', stat.mean(compteur))
# print(poissonsRestants)
print('Renconres moyennes:', stat.mean(rencontre), end='')
print(' || Deplacements moyens :', stat.mean(deplacements))
with open('statistcs.txt', 'a') as f:
f.write('/\\/\\/\\/\\ STATISTICS /\\/\\/\\/\\/\\' + '\n')
f.write('Nombre de poissons : ' + str(taille * taille) + '\n')
f.write('Nombre de repetitions : ' + str(nbRep) + '\n\n')
f.write('Moyenne de rencontres : ' + str(stat.mean(rencontre)) + '\n')
f.write('Moyenne de deplacements : ' + str(stat.mean(deplacements)) + '\n')
f.write('\n\n\n\n\n')