Why is this not working correctly?
When a negative value was used, the code is supposed to return the actual word but I got a different answer. What could possibly be the reason?
Thanks for reaching out!
Notice that in the second cell you need to feed the encrypted text in order to retrieve the original string. To understand this better, study the following code snippet:
First, we encrypt the string 'the cat sat on the mat' to obtain the string 'nby wun mun ih nby gun'. To retrieve back the original string, you want to feed 'nby wun mun ih nby gun' to the encrypt() method with a negative required_shift value.
Hope this helps!