mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
13 lines
227 B
Plaintext
13 lines
227 B
Plaintext
import "random" for Random
|
|
|
|
var random = Random.new()
|
|
|
|
var correct = 0
|
|
for (i in 1..100) {
|
|
var n = random.float()
|
|
if (n >= 0) correct = correct + 1
|
|
if (n < 1) correct = correct + 1
|
|
}
|
|
|
|
System.print(correct) // expect: 200
|