Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Fivenum/11l/fivenum.11l
Normal file
17
Task/Fivenum/11l/fivenum.11l
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
F fivenum(array)
|
||||
V n = array.len
|
||||
V x = sorted(array)
|
||||
V n4 = floor((n + 3.0) / 2.0) / 2.0
|
||||
V d = [1.0, n4, (n + 1) / 2, n + 1 - n4, Float(n)]
|
||||
[Float] sum_array
|
||||
L(e) 5
|
||||
V fl = Int(floor(d[e] - 1))
|
||||
V ce = Int(ceil(d[e] - 1))
|
||||
sum_array.append(0.5 * (x[fl] + x[ce]))
|
||||
R sum_array
|
||||
|
||||
V x = [0.14082834, 0.09748790, 1.73131507, 0.87636009, -1.95059594, 0.73438555, -0.03035726, 1.46675970,
|
||||
-0.74621349, -0.72588772, 0.63905160, 0.61501527, -0.98983780, -1.00447874, -0.62759469, 0.66206163,
|
||||
1.04312009, -0.10305385, 0.75775634, 0.32566578]
|
||||
|
||||
print(fivenum(x))
|
||||
Loading…
Add table
Add a link
Reference in a new issue