NOTE: You have not given instructions for encode, so I have not done it. Moreover the example given for cat is incorrect. So, I have taken other example."
Code is here and screenshots are provided below for help:
braille_table={"a":[[1,0],[0,0],[0,0]],
"b":[[1,0],[1,0],[0,0]],
"c":[[1,1],[0,0],[0,0]],
"d":[[1,1],[0,1],[0,0]],
"e":[[1,0],[0,1],[0,0]],
"f":[[1,1],[1,0],[0,0]],
"g":[[1,1],[1,1],[0,0]],
"h":[[1,0],[1,1],[0,0]],
"i":[[0,1],[1,0],[0,0]],
"j":[[0,1],[1,1],[0,0]],
"k":[[1,0],[0,0],[1,0]],
"l":[[1,0],[1,0],[1,0]],
"m":[[1,1],[0,0],[1,0]],
"n":[[1,1],[0,1],[1,0]],
"o":[[1,0],[0,1],[1,0]],
"p":[[1,1],[1,0],[1,0]],
"q":[[1,1],[1,1],[1,0]],
"r":[[1,0],[1,1],[1,0]],
"s":[[0,1],[1,0],[1,0]],
"t":[[0,1],[1,1],[1,0]],
"u":[[1,0],[0,0],[1,1]],
"v":[[1,0],[1,0],[1,1]],
"w":[[0,1],[1,1],[0,1]],
"x":[[1,1],[0,0],[1,1]],
"y":[[1,1],[0,1],[1,1]],
"z":[[1,0],[0,1],[1,1]]}
def decode(file_name):
f1=open(file_name,"r")
Lines=f1.readlines()
word=""
for line in Lines:
l1=[]
l2=[]
l3=[]
l4=[]
for i in
range(0,2):
l1.append(int(line[i]))
for i in
range(2,4):
l2.append(int(line[i]))
for i in
range(4,6):
l3.append(int(line[i]))
l4=[l1,l2,l3]
for letter,key in
braille_table.items():
if key==l4:
word+=letter
return word
file_name=input("Enter file name: ")
plain_text=decode(file_name)
print(plain_text)
screenshots of code with comments:![braille_table 11 #Dictionary for braille conversion {a:[[1,0],[0,0],[0,0]], 6:[[1,0],[1,0],[0,0]], C:[[1,1],[0,0],[0,0]](http://img.homeworklib.com/questions/93bd62b0-c2f8-11ea-95b5-e12f66ae5c64.png?x-oss-process=image/resize,w_560)

text file used for example
output of code

Please give your feedback
Using the template code provided in the braille translator.py file as a starting point, complete functions...
Spanish Vocabulary Helper For this assignment, we are going to work with adding and removing data from arrays, linear search, and File I/O. In addition, you will learn to work with parallel arrays This program will assist an English-speaking user to build their vocabulary in Spanish This program will read a file containing a list of words in English and another containing the translation of those words in Spanish. The words and corresponding translations should to be stored in two...
A. File I/O using C library functions File I/O in C is achieved using a file pointer to access or modify files. Processing files in C is a four-step process: o Declare a file pointer. o Open the desired file using the pointer. o Read from or write to the file and finally, o Close the file. FILE is a structure defined in <stdio.h>. Files can be opened using the fopen() function. This function takes two arguments, the filename and...
Preliminaries Download the template class and the driver file. Objective Learn how to traverse a binary search tree in order. Description For the template class BinarySearchTree, fill in the following methods: insert - Inserts values greater than the parent to the right, and values lesser than the parent to the left.parameters elem - The new element to be inserted into the tree. printInOrder - Prints the values stored in the tree in ascending order. Hint: Use a recursive method to...
Language: C Write an encoder and a decoder for a modified "book cipher." A book cipher uses a document or book as the cipher key, and the cipher itself uses numbers that reference the words within the text. For example, one of the Beale ciphers used an edition of The Declaration of Independence as the cipher key. The cipher you will write will use a pair of numbers corresponding to each letter in the text. The first number denotes the...
Language: C Write an encoder and a decoder for a modified "book cipher." A book cipher uses a document or book as the cipher key, and the cipher itself uses numbers that reference the words within the text. For example, one of the Beale ciphers used an edition of The Declaration of Independence as the cipher key. The cipher you will write will use a pair of numbers corresponding to each letter in the text. The first number denotes the...
Background: The first step towards helping someone 'decode' a message is often to count how many times each letter of the alphabet appears in the message. Then divide each count by the total number of letters to compute the relative 'frequency'. From these frequencies, it may be easier to recognize which letters are assigned to the vowels. For your own reference, here is a table of standard letter frequencies from typical English text. (You do NOT need to display this...
For this assignment, you will write a program to work with Huffman encoding. Huffman code is an optimal prefix code, which means no code is the prefix of another code. Most of the code is included. You will need to extend the code to complete three additional methods. In particular, code to actually build the Huffman tree is provided. It uses a data file containing the frequency of occurrence of characters. You will write the following three methods in the...
- Complete the code to solve a maze- Discuss related data structures topicsProgramming-----------In this part, you will complete the code to solve a maze.Begin with the "solveMaze.py" starter file.This file contains comment instructions that tell you where to add your code.Each maze resides in a text file (with a .txt extension).The following symbols are used in the mazes:BARRIER = '-' # barrierFINISH = 'F' # finish (goal)OPEN = 'O' # open stepSTART = 'S' # start stepVISITED = '#' #...
In a new file located in the same package as the class Main, create a public Java class to represent a photograph that consists of a linear (not 2D) array of pixels. Each pixel is stored as an integer. The photograph class must have: (a) Two private fields to represent the information stored about the photograph. These are the array of integers and the date the photograph was taken (stored as a String). The values in the array must be...