lease look at attached photos. It needs to pass all of the simulations. Thanks in advance Cryptography is the practice of encryption. Information Security uses cryptography techniques to encrypt and decrypt data. A simple encryption method might take plaintext and mix up the letters using some predetermined pattern and then use that pattern to decrypt the data for reading. Ciphers are the algorithms used to put the data into its secret pattern and then systematically decrypt it for reading. This script is going to use a famous simple cipher called the Caesar Cipher. It is a substitution cipher where each letter in the text is 'shifted' in a certain number of places. It uses the alphabet as the primary pattern and then based on the shift number, it would shift all the letters and replace the alphabet with our pattern. For example, if our shift number was 3, then A would be replaced with D, if we performed a right shift. As an example: Text = "THE CAT IS VISIBLE AT MIDNIGHT" Ciphertext = "WKH FDW LV YLVLEOH DW PLGQLIJKW" The keys to decrypt this message are the shift number and the direction. The shift value can be any integer from 0 - 25. The above example uses shift = 3 and the shift direction is right or direction = 'r'. Complete the CipherTest class by adding a constructor to initialize a cipher item. The constructor should initialize the shift to 0, and the direction to 'r' for right shift. If the constructor is called with a shift value, and direction, the constructor should assign each instance attribute with the appropriate parameter value. Complete the following TODO's: (1) create input for text, shift value, and direction (use lower( )) to keep l and r lower case (2) create a cipher item and use the constructor with the above input values (3) usecontrol structures to call shifttoright() if direction is right and call shifttoleft if direction is left. Make sure you print out the return encrypted message inside the control structures. We can create the encrypted text by using the ord ( ) function. This function will return an integer that represents the Unicode code point of the character. Character are represented by different values for upp/er and lower case so an 'a' returns the integer 97. By using the unicode value we can add and subtract our shift value represented by an integer. The given program accepts as input a text string as our message to be encrypted, a shift value, and a direction of 'l' for left and 'r' for right. The program creates a cipher item using the input values. The program outputs the encrypted message based on the shift value and the direction provided.
Please look at attached photos. It needs to pass all of the simulations. Thanks in advance
Cryptography is the practice of encryption.
Ciphers are the
For example, if our shift number was 3, then A would be replaced with D, if we performed a right shift. As an example:
Text = "THE CAT IS VISIBLE AT MIDNIGHT" Ciphertext = "WKH FDW LV YLVLEOH DW PLGQLIJKW"
The keys to decrypt this message are the shift number and the direction. The shift value can be any integer from 0 - 25. The above example uses shift = 3 and the shift direction is right or direction = 'r'.
Complete the CipherTest class by adding a constructor to initialize a cipher item. The constructor should initialize the shift to 0, and the direction to 'r' for right shift. If the constructor is called with a shift value, and direction, the constructor should assign each instance attribute with the appropriate parameter value.
Complete the following TODO's: (1) create input for text, shift value, and direction (use lower( )) to keep l and r lower case (2) create a cipher item and use the constructor with the above input values (3) usecontrol structures to call shifttoright() if direction is right and call shifttoleft if direction is left. Make sure you print out the return encrypted message inside the control structures.
We can create the encrypted text by using the ord ( ) function. This function will return an integer that represents the Unicode code point of the character. Character are represented by different values for upp/er and lower case so an 'a' returns the integer 97. By using the unicode value we can add and subtract our shift value represented by an integer.
The given program accepts as input a text string as our message to be encrypted, a shift value, and a direction of 'l' for left and 'r' for right. The program creates a cipher item using the input values. The program outputs the encrypted message based on the shift value and the direction provided.
![5:21 1
A learn.zybooks.com
= zyBooks -
test submission - 5:20 PM EDT on 09/17/21
Only show failing tests
Compare output ^
Output differs. See highlights below.
Special character le
Cryptography is fun!
Input
4
r
Your output
None
Expected output
Gvctxskvetlc mw jyrs
Compare output ^
Output differs. See highlights below.
Special character le
Cryptography is fun!
Input
4
Your output
None-
Expected output
Ynulpkcnwldu eo bqjk
Unit test a
Tests that CipherText("The job is done!", 6, "r") correctly ir
Traceback
Tettnt Jall last):](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7502cd5e-da86-40eb-a752-a1d6f4f28a25%2F51791048-8c6b-431a-9c60-7382880f8e8d%2Fkgo9i2s_processed.png&w=3840&q=75)
![My library > CYB/135: ..
= zyBooks
8 Adam Brygidyr
▼
1.13: LAB: Introduction to ..
Tests that CipherText("The job is done!", 6, "r") correctly initializes item
Traceback (most recent call last):
ТуреError:
init_ () takes from 1 to 3 positional arguments but 4 were given
Your output
None
4: Unit test ^
Tests that CipherText("A cat is visible at midnight", 5, "I") correctly initializes item
Traceback (most recent call last):
ТурeError:
init_ () takes from 1 to 3 positional arguments but 4 were given
Your output
None](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7502cd5e-da86-40eb-a752-a1d6f4f28a25%2F51791048-8c6b-431a-9c60-7382880f8e8d%2Fr1gnmac_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)