Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,28 @@
constant {names, probs} = columnize({{"aleph", 1/5},
{"beth", 1/6},
{"gimel", 1/7},
{"daleth", 1/8},
{"he", 1/9},
{"waw", 1/10},
{"zayin", 1/11},
{"heth", 1759/27720}})
sequence results = repeat(0,length(names))
atom r
constant lim = 1000000
for j=1 to lim do
r = rnd()
for i=1 to length(probs) do
r -= probs[i]
if r<=0 then
results[i]+=1
exit
end if
end for
end for
printf(1," Name Actual Expected\n")
for i=1 to length(probs) do
printf(1,"%6s %8.6f %8.6f\n",{names[i],results[i]/lim,probs[i]})
end for