Téléverser les fichiers vers "/"

This commit is contained in:
Sky
2025-11-17 18:36:28 +01:00
parent 2a0449647c
commit e0695b4dbe
4 changed files with 113 additions and 0 deletions

21
script_tp4.R Normal file
View File

@ -0,0 +1,21 @@
elements = runif(1000)
effectifs = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
keys = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
for (i in 0:9) {
borne_min = i/ 10
borne_max = (i + 1) / 10
for (e in elements) {
if (e >= borne_min && e <= borne_max) {
effectifs[i + 1] = effectifs[i + 1] + 1
}
}
keys[i + 1] = i + 0.5
}
df = data.frame(keys, effectifs)
print(df)