Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Rounding the values of a mapping

The problem is only with the round(, 2) code

f(x)=round((1/add(votes_cand))*x,2)
percent_votes_cand=list(map(f,[10, 20 ,30]))
percent_votes_cand

Rounding the values of a mapping

The problem is only with the round(, 2) code

f(x)=round((1/add(votes_cand))*x,2)
percent_votes_cand=list(map(f,[10, 20 ,30]))
percent_votes_cand

Is it possible to act ex-ante not expost in that case ?

Rounding the values of a mapping

The problem is only with the round(, 2) code

f(x)=round((1/add(votes_cand))*x,2)
f(x)=round((1/add([10, 20 ,30]))*x,2)
percent_votes_cand=list(map(f,[10, 20 ,30]))
percent_votes_cand

Is it possible This gives an error since round() couldn't be applied to act ex-ante a theoretical argument. The following code works but I want to obtain truncated to 2 digits percentages not expost in that case ?elements of Q