Question: What is wrong with the code that was written? Strings and Text Files (Exercise 1) Due on Apr 30 at 6 PM EDT +encrypt.py FAILED:

What is wrong with the code that was written?
Strings and Text Files (Exercise 1) Due on Apr 30 at 6 PM EDT +encrypt.py FAILED: Encryption I Strings and Text Flles 1 ata input("n Enter text for encryption:" 2 dist int(input(n Enter the value for Distance: ")) 3 datum = "" 4 for cha in data: INPUT Write a script that inputs a line of plaintext and a distance value and outputs an encrypted text using a Caesar cipher. The script should work for any printable characters. abcde 128 val ord(cha) cipher-val = val + dist if cipher val ord('z: OUTPUT cipher val ord('a')+dist (ord('z) val + 1) 18 11 print('n Encrypted Text:') 12 print(datum) datum datum chr(cipher_val) Enter text for encryption: abcde Enter the value for Distance: 128 Encrypted Text: RESU Keywords searched for in your program's output. abcde EXPECTED OUTPUT abcde FAILED: Encryption II PASSED: Encryption IlI
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
