Aug-31-2018, 08:15 PM
(This post was last modified: Aug-31-2018, 08:15 PM by wak_stephanie.)
I need to edit my rotate function to consider capital letters but I am confused on how to do that. Any help is appreciated. Thank you.
import rotate def rotate(letter, rot): pos = alphabet_position(letter) new_pos = (pos + rot) % 26 new_char = alphabet_pos[new_pos] return new_char
Error:Traceback ︎For vigenere.encrypt('The crow flies at midnight!', 'boom')
You should have returned this:
'Uvs osck rmwse bh auebwsih!'
But you actually returned this:
'uvs osck rmwse bh auebwsih!'
✖ ︎For vigenere.encrypt('BaRFoo', 'BaZ')
You should have returned this:
'CaQGon'
But you actually returned this:
'caqgon'
✖ ︎For vigenere.encrypt('Sailing <3 ships thru br0ken harbors', 'NeilYoung')
You should have returned this:
'Feqwgba <3 fnvta effo ox0xiv syfvbxf'
But you actually returned this:
'feqwgba <3 fnvta effo ox0xiv syfvbxf'