Price fraction: Difference between revisions

Content added Content deleted
(→‎{{header|Picat}}: Split into subsections)
Line 3,310: Line 3,310:


=={{header|Picat}}==
=={{header|Picat}}==
Approach 1:
===Approach 1===
<lang Picat>go =>
<lang Picat>go =>
_ = random2(),
_ = random2(),
Line 3,361: Line 3,361:
0.62 = 0.74</pre>
0.62 = 0.74</pre>


Approach 2: Using a fact table.
===Using a fact table===
<lang Picat>% Using a "fact table" of the rules
<lang Picat>go2 =>
go2 =>
_ = random2(),
_ = random2(),
foreach(_ in 1..10)
foreach(_ in 1..10)
Line 3,407: Line 3,406:
0.58 = 0.7
0.58 = 0.7
0.0 = 0.1</pre>
0.0 = 0.1</pre>



=={{header|PicoLisp}}==
=={{header|PicoLisp}}==