Penney's game: Difference between revisions

m
(Added Quackery.)
m (→‎{{header|Wren}}: Minor tidy)
 
(2 intermediate revisions by one other user not shown)
Line 3,168:
beststart dup
say "I guess: " echo$
computergoal put ]
cr ]
cr
$ ""
Line 3,182 ⟶ 3,183:
echo$ cr
computergoal release
playergoal release ] is play ( --> )</syntaxhighlight>
</syntaxhighlight>
 
{{out}}
Line 3,199:
For example, for "heads tails heads" type "HTH".
 
You start. Please enter your guess: HTTHTH
I guess: HHT
 
IYou win.
The complete sequence was: HTHTHHHTTTHTH
 
Stack empty.
Line 3,217 ⟶ 3,218:
For example, for "heads tails heads" type "HTH".
 
I start. My guess is: THTHTT
Please enter your guess: HTHHHT
 
IYou win.
The complete sequence was: TTTTTHTHTHTHHHT
 
Stack empty.
 
/O> </pre>
 
=={{header|R}}==
Line 4,334 ⟶ 4,335:
{{trans|Kotlin}}
{{libheader|Wren-str}}
<syntaxhighlight lang="ecmascriptwren">import "random" for Random
import "io" for Stdin, Stdout
import "timer" for Timer
import "./str" for Str
 
var rand = Random.new()
9,476

edits