Ask Your Question

Revision history [back]

I want to know hoe can solve this error

shift_system = ShiftCryptosystem(AlphabeticStrings()) message = "The shift cryptosystem generalizes the Caeser cipher" plaintext = shift_system.encoding(message) print("plaintext:", plaintext) key = 7 encode = shift_system(key) ciphertext = encode(plaintext) print("ciphertext:", ciphertext) decode = shift_system(shift_system.inverse_key(key)) print("Decoding ciphertext gives plaintext?", plaintext == decode(ciphertext))

I want to shift backward to decrypt, but when I write k=-7, it it error that k is outside of range, so how can I correct it?

I want to know hoe can solve this error

shift_system = ShiftCryptosystem(AlphabeticStrings()) message = "The shift cryptosystem generalizes the Caeser cipher" plaintext = shift_system.encoding(message) print("plaintext:", plaintext) key = 7 encode = shift_system(key) ciphertext = encode(plaintext) print("ciphertext:", ciphertext) decode = shift_system(shift_system.inverse_key(key)) print("Decoding ciphertext gives plaintext?", plaintext == decode(ciphertext))

I want to shift backward to decrypt, but when I write k=-7, it it error that k is outside of range, so how can I correct it?

I want to know hoe can solve this error

shift_system = ShiftCryptosystem(AlphabeticStrings()) message = "The shift cryptosystem generalizes the Caeser cipher" plaintext = shift_system.encoding(message) print("plaintext:", plaintext) key = 7 encode = shift_system(key) ciphertext = encode(plaintext) print("ciphertext:", ciphertext) decode = shift_system(shift_system.inverse_key(key)) print("Decoding ciphertext gives plaintext?", plaintext == decode(ciphertext))

I want to shift backward to decrypt, but when I write k=-7, it it error that k is outside of range, so how can I correct it?

I want to know hoe can solve this error

shift_system = ShiftCryptosystem(AlphabeticStrings()) message = "The shift cryptosystem generalizes the Caeser cipher" plaintext = shift_system.encoding(message) print("plaintext:", plaintext) key = 7 encode = shift_system(key) ciphertext = encode(plaintext) print("ciphertext:", ciphertext) decode = shift_system(shift_system.inverse_key(key)) print("Decoding ciphertext gives plaintext?", plaintext == decode(ciphertext))

I want to shift backward to decrypt, but when I write k=-7, k=-7, it it error that k k is outside of range, so how can I correct it?

shift_system = ShiftCryptosystem(AlphabeticStrings())
message = "The shift cryptosystem generalizes the Caeser cipher"
plaintext = shift_system.encoding(message)
print("plaintext:", plaintext)
key = 7
encode = shift_system(key)
ciphertext = encode(plaintext)
print("ciphertext:", ciphertext)
decode = shift_system(shift_system.inverse_key(key))
print("Decoding ciphertext gives plaintext?", plaintext == decode(ciphertext))
click to hide/show revision 5
retagged

I want to know hoe can solve this error

I want to shift backward to decrypt, but when I write k=-7, it it error that k is outside of range, so how can I correct it?

shift_system = ShiftCryptosystem(AlphabeticStrings())
message = "The shift cryptosystem generalizes the Caeser cipher"
plaintext = shift_system.encoding(message)
print("plaintext:", plaintext)
key = 7
encode = shift_system(key)
ciphertext = encode(plaintext)
print("ciphertext:", ciphertext)
decode = shift_system(shift_system.inverse_key(key))
print("Decoding ciphertext gives plaintext?", plaintext == decode(ciphertext))
click to hide/show revision 6
None

I want to know hoe can solve this error

I want to shift backward to decrypt, but when I write k=-7, it it error that k is outside of range, so how can I correct it?

shift_system = ShiftCryptosystem(AlphabeticStrings())
message = "The shift cryptosystem generalizes the Caeser cipher"
plaintext = shift_system.encoding(message)
print("plaintext:", plaintext)
key = 7
encode = shift_system(key)
ciphertext = encode(plaintext)
print("ciphertext:", ciphertext)
decode = shift_system(shift_system.inverse_key(key))
print("Decoding ciphertext gives plaintext?", plaintext == decode(ciphertext))