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:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
You know the right answer?
Def test_simpleDecode_1():
assert simpleDecode('~,,Qf~,,Qf~RRQ', createAlphabet(),createCiphe...
Questions