Question: What is missing in the code? 1 #!/usr/bin/env python3 2 # -*- coding: utf-8 -*- 3 4 5 Source with Python 6 Sydney Dods 7

What is missing in the code? 1 #!/usr/bin/env python3 2 # -*- coding: utf-8 -*- 3 4 5

1 #!/usr/bin/env python3 2 # -*- coding: utf-8 -*- 3 4 5 Source with Python 6 Sydney Dods 7 Aracely 8 @author: andrealuna 10 11 12 13 14 #Works 15 def encrypt (message, s): 16 result = "" 17 for i in range (len (message)): 18 char = message [i] if (char.isupper()): result + chr((ord(char) + s65) % 26 + 65) else: 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 Created on Tue Oct 12 14:54:22 2021 result + chr((ord(char) + s 97) % 26 + 97) return result #works but my teacher said I can delete it because EnorDe I can put s= or I can use it def decode(message, s): result = "* for i in range (len (message)): char = message [i] if (char.isupper()): result + chr((ord(char) - s-65) % 26 + 65) else: result + chr((ord(char)s - 97) % 26 + 97) return result #I'm not sure but I think am not giving this function a piece of what it needs to complete w def EnorDe(text, message, s): if text=="Encrypt": elif text=="Decode": s=-1*keyshift return("Cipher: " + decode(message, s)) return ("Cipher:" + encrypt (message, s)) text = input('Encrypt or Decode?') message=input("Insert Message ") s=int (input("Keyshift?") print (EnorDe(text)) E uitvany anu COUNT WO dictonary DNA Documents Downloads Finaltrial.mp4 Finaltrial2.mp4 guru99.txt Hello World humptydumpty Id_file idnumber image Console 30/A SyntaxError: invalid syntax print(EnorDe(text)) SyntaxError: invalid syntax 10/12/21 2.00 FIV 9/30/21 2:44 PM 10/7/21 3:00 PM 9/19/21 10:06 PM 10/14/21 2:42 PM 9/19/21 10:04 PM In [39]: runfile('/Users/andrealuna/Ceaser decod', wdir='/Us File "/Users/andrealuna/Ceaser decod", line 47 9/19/21 10:20 PM 10/12/21 2:53 PM 8/31/21 3:13 PM 9/21/21 2:39 PM 9/26/21 4:21 PM 9/27/21 5:35 PM 9/15/21 7:42 PM print(EnorDe(text)) SyntaxError: invalid syntax Variable explorer Help F In [40]: runcell(0, '/Users/andrealuna/Ceaser decod') File "/Users/andrealuna/Ceaser decod", line 47 print(EnorDe (text)) SyntaxError: invalid syntax In [42]: In [41]: runcell(0, '/Users/andrealuna/Ceaser decod') File "/Users/andrealuna/Ceaser decod", line 47

Step by Step Solution

3.53 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Python version 38 def encryptmessage s Function that encrypts the given message using the key s and returns the encrypted message The input message on... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!