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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:30, elizabethburkha
Which text format is this, "the text is transcribed exactly as it sounds and includes all the utterances of the speakers. "?
Answers: 2
image
Computers and Technology, 23.06.2019 06:00, 573589
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, cdavis379
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a. if the manual switch s is on, then the light l is on. b. besides the manual switch, there is a motion detector, m1, which activatesthis light. c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d. the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
image
Computers and Technology, 23.06.2019 20:30, batmandillon21
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
You know the right answer?
Def test_simpleDecode_1():
assert simpleDecode('~,,Qf~,,Qf~RRQ', createAlphabet(),createCiphe...

Questions in other subjects: