Answered step by step
Verified Expert Solution
Link Copied!

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?image text in transcribed

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 "", ine1, in

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions