subject

Def test_simpleDecode_1():
assert simpleDecode('~,,Qf~,,Qf~RRQ', createAlphabet(),createCipher(creat eAlphabet())) == 'beep beep boop'

def test_simpleDecode_2():
assert simpleDecode('tbamret s==sida', createCipher('abtes= rmid'), createCipher(createCipher('abtes= rmid'))) == 'midterms == bad'

def test_simpleDecode_3():
assert simpleDecode('','onlythescarvbip ', 'pasdfghjklzxcvbn') == 'only these characters have to be in alphabet'

def test_simpleDecode_4():
assert simpleDecode('abc','abg','ghj') == None

def test_simpleDecode_5():
assert simpleDecode('abc','abg','ghzj') == -1
def simpleDecode(ciphertext, alphabet, cipher):
"""
Given ciphertext to decode,
an alphabet and a cipher alphabet, return
the decoded plaintext.
If the lengths of the alphabet and
cipher are not the same, return -1.
If a character from ciphertext is not
found in the cipher alphabet, return None.
"""
return "stub"

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Experimental data that is expressed using numbers is said to be
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
question
Computers and Technology, 25.06.2019 06:00
Me on this app how do you take a picture of your work
Answers: 1
question
Computers and Technology, 25.06.2019 08:20
The control unit takes ths instructions fetched by the preteched unit and translates them into a form that can be understood by
Answers: 1
You know the right answer?
Def test_simpleDecode_1():
assert simpleDecode('~,,Qf~,,Qf~RRQ', createAlphabet(),createCiphe...
Questions
question
Mathematics, 10.11.2020 01:00
question
Mathematics, 10.11.2020 01:00
question
Arts, 10.11.2020 01:00
Questions on the website: 13722360