repo.or.cz
/
trinary.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix ttlatch, one of the inputs to a TNOR3 was miswired.
[trinary.git]
/
asm
/
ssays.py
blob
4fec9334ab5451ebca57f69b21bfb78707dc8ef5
1
# Created:200803010
2
# By Jeff Connelly
3
#
4
# Trinary Simon Says (very high level, prototype for asm)
5
6
import
sys
7
import
random
8
9
print
"(Enter what Simon Says as [0,-1,1], for example)
\n
"
10
11
while True
:
12
said
= [
13
random
.
randint
(-
1
,
1
),
14
random
.
randint
(-
1
,
1
),
15
random
.
randint
(-
1
,
1
)]
16
print
"Simon Says:"
,
said
17
user
=
None
18
while
user
!=
said
:
19
try
:
20
user
=
input
()
21
except
:
22
continue
23
print
"Correct!
\n
"
24