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, 21.06.2019 15:30
Some of the items below indicate the steps required to move a slide to a different location in a presentation. select those steps and indicate the order in which they should be performed to move the slide. (for example, if an item describes what you do first, select 1.) included in the list are items that are not part of the process. for these items, select n/a, an abbreviation for not applicable. 1 — first 2 — second 3 — third 4 — fourth 5 — fifth 6 — sixth n/a — not applicable drag the slide to the desired place. enter the slide position desired. hold the mouse button down. select move from the tools menu. select the slide. switch to the notes view.
Answers: 3
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
You know the right answer?
Def test_simpleDecode_1():
assert simpleDecode('~,,Qf~,,Qf~RRQ', createAlphabet(),createCiphe...
Questions
question
Mathematics, 10.01.2021 06:40
question
English, 10.01.2021 06:40
question
Arts, 10.01.2021 06:40
question
Mathematics, 10.01.2021 06:40
question
Mathematics, 10.01.2021 06:40
question
Mathematics, 10.01.2021 06:40
Questions on the website: 13722361