Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can someone tell me what is wrong with my python computer science program? Editor He p c4p3 (1).py incc9.py c9p2.py c9.p3.py* 9p4. Source Console Object
Can someone tell me what is wrong with my python computer science program?
Editor He p c4p3 (1).py incc9.py c9p2.py c9.p3.py* 9p4. Source Console Object 1t Arrhen Fejokw 2 Starting out with python 3 This program assigns codes to each letter of the alphabet Usage 11/8/2018 5t 11/9/2818 Here you can get help of any object by pressing Cmd+I in front of it, either on the Editor or the Console. Tdef nain): Help can also be shown automatically after writing a left parenthesis next to an object. You can activate this behavior in Preferences>Help. 10 11 fileopen( 'file.txt'r' 12 file-read = file1 . read() 13 filel.close) 14 15 encr file- open'encr.txt','w) 16 Tor ch in tile_read: 17 New to Spyder? Read our tutorial encr tile.writelcodes[ch]) 9 else: 20 21 encr tile.write(ch) encr file.close 230 Program to read encrypted file and display its decscritpion 24 25 enc r.file = open(.encr.txt','r') 26 file read-encr file. read) 27 encr file.close 28 29 codes_itenscodes.itens) 30 31 for ch in file_read: 32 Variable explorer File explorer Hel Python consale Console 1JA In 191: runfilel'/Users/arrhen/Downloads/c9.c3.py', wdir-'/Users/arrhen/Downloads' Traceback (most recent call last): if not ch in codes.values) or ch".': print ch) File "Usersfarrhen/anaconda3/ib/python3.6/site-packages/IPython/core/ interactiveshell.py", ine 2963, in un_code execlcode_obj, selr.user global_ns, self.user_ns) 35 else: 36 if ch v and ch print(k,end-") File "Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started