Braille Text Analysis

Students will use string manipulations, turtles, lists, and dictionaries to collect and analyze braille text

        

My tests:

-------------------------------------
Testing braille_dictionary contents:
key value
[0, 0, 0, 0, 0, 0]
1 [1, 0, 0, 0, 0, 0]
2 [1, 1, 0, 0, 0, 0]
3 [1, 0, 0, 1, 0, 0]
4 [1, 0, 0, 1, 1, 0]
5 [1, 0, 0, 0, 1, 0]
6 [1, 1, 0, 1, 0, 0]
7 [1, 1, 0, 1, 1, 0]
8 [1, 1, 0, 0, 1, 0]
9 [0, 1, 0, 1, 0, 0]
0 [0, 1, 0, 1, 1, 0]
a [1, 0, 0, 0, 0, 0]
b [1, 1, 0, 0, 0, 0]
c [1, 0, 0, 1, 0, 0]
d [1, 0, 0, 1, 1, 0]
e [1, 0, 0, 0, 1, 0]
f [1, 1, 0, 1, 0, 0]
g [1, 1, 0, 1, 1, 0]
h [1, 1, 0, 0, 1, 0]
i [0, 1, 0, 1, 0, 0]
j [0, 1, 0, 1, 1, 0]
k [1, 0, 1, 0, 0, 0]
l [1, 1, 1, 0, 0, 0]
m [1, 0, 1, 1, 0, 0]
n [1, 0, 1, 1, 1, 0]
o [1, 0, 1, 0, 1, 0]
p [1, 1, 1, 1, 0, 0]
q [1, 1, 1, 1, 1, 0]
r [1, 1, 1, 0, 1, 0]
s [0, 1, 1, 1, 0, 0]
t [0, 1, 1, 1, 1, 0]
u [1, 0, 1, 0, 0, 1]
v [1, 1, 1, 0, 0, 1]
x [1, 0, 1, 1, 0, 1]
y [1, 0, 1, 1, 1, 1]
z [1, 0, 1, 0, 1, 1]
w [0, 1, 0, 1, 1, 1]

but [1, 0, 0, 0, 0, 0]
can [1, 0, 0, 1, 0, 0]
do [1, 0, 0, 1, 1, 0]
every [1, 0, 0, 0, 1, 0]
from [1, 1, 0, 1, 0, 0]
go [1, 1, 0, 1, 1, 0]
have [1, 1, 0, 0, 1, 0]
just [0, 1, 0, 1, 1, 0]
knowledge [1, 0, 1, 0, 0, 0]
like [1, 1, 1, 0, 0, 0]
more [1, 0, 1, 1, 0, 0]
not [1, 0, 1, 1, 1, 0]
people [1, 1, 1, 1, 0, 0]
quite [1, 1, 1, 1, 1, 0]
rather [1, 1, 1, 0, 1, 0]
so [0, 1, 1, 1, 0, 0]
that [0, 1, 1, 1, 1, 0]
us [1, 0, 1, 0, 0, 1]
very [1, 1, 1, 0, 0, 1]
it [1, 0, 1, 1, 0, 1]
you [1, 0, 1, 1, 1, 1]
as [1, 0, 1, 0, 1, 1]
will [0, 1, 0, 1, 1, 1]

-------------------------------------
Testing translator(): the quick
brown
fox
jumps
over
the
lazy dog
[[0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0]], [[1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 0, 1], [0, 1, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 0, 0]],
[[1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0]],
[[1, 1, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 0, 1]],
[[0, 1, 0, 1, 1, 0], [1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 0, 0]], [[1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0]],
[[0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0]],
[[1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1]], [[1, 0, 0, 1, 1, 0], [1, 0, 1, 0, 1, 0], [1, 1, 0, 1, 1, 0]]]


do
it
as
you
will
[[1, 0, 0, 1, 1, 0],
[1, 0, 1, 1, 0, 1],
[1, 0, 1, 0, 1, 1],
[1, 0, 1, 1, 1, 1],
[0, 1, 0, 1, 1, 1]]

from
every
corner
of
the
planet,
people
go
and
seek
more
knowledge
[[1, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0], [[1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0]],
[[1, 0, 1, 0, 1, 0], [1, 1, 0, 1, 0, 0]],
[[0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0]], [[1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0], [1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 0]],
[1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 0], [[1, 0, 0, 0, 0, 0], [1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 0]], [[0, 1, 1, 1, 0, 0], [1, 0, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0], [1, 0, 1, 0, 0, 0]],
[1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 0, 0]]


It'
possible
we
can
do
more
with
just
very
little.
[[[0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0]],
[[1, 1, 1, 1, 0, 0], [1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 0, 0], [0, 1, 0, 1, 0, 0], [1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 1, 0]],
[[0, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 0]],
[1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0], [[0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0]], [0, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1],
[[1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 1, 0]]]


I
have
quite
the
conundrum
that
may
come
back
to
bite
us.
[[0, 1, 0, 1, 0, 0], [1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 0], [[0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0]],
[[1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0], [1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 1, 0], [1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 0, 0]],
[0, 1, 1, 1, 1, 0], [[1, 0, 1, 1, 0, 0], [1, 0, 0, 0, 0, 0], [1, 0, 1, 1, 1, 1]],
[[1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 0]],
[[1, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 0, 0]],
[[0, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 0]], [[1, 1, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0]],
[[1, 0, 1, 0, 0, 1], [0, 1, 1, 1, 0, 0]]]

We
have
to
do
this
so
that
racoons
don't
come
back
again.
[[[0, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 0]],
[1, 1, 0, 0, 1, 0], [[0, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 0]],
[1, 0, 0, 1, 1, 0], [[0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 0, 0]],
[0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0],
[[1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0]],
[[1, 0, 0, 1, 1, 0], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0]], [[1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 0]],
[[1, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 0, 0]],
[[1, 0, 0, 0, 0, 0], [1, 1, 0, 1, 1, 0], [1, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]]]

But
rather
then
start
over
, why
not
be
more
like
her
and
never
give
up?
[[1, 0, 0, 0, 0, 0], [1, 1, 1, 0, 1, 0],
[[0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0], [1, 0, 1, 1, 1, 0]],
[[0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 0], [1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 0]],
[[1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0]],
[[0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 0], [1, 0, 1, 1, 1, 1]],
[1, 0, 1, 1, 1, 0], [[1, 1, 0, 0, 0, 0], [1, 0, 0, 0, 1, 0]],
[1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0], [[1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0]],
[[1, 0, 0, 0, 0, 0], [1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 0]], [[1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0]],
[[1, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 0]],
[[1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0]]]

Testing print_braille_word() function:

Input: 'hello'

Output: ⠓⠑⠇⠇⠕

Input: 'world'

Output: ⠺⠕⠗⠇⠙

Input: '123'

Output: ⠼⠂⠆

Input: 'braille'

Output: ⠃⠗⠁⠊⠇⠑

End of tests.