Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have dictionary name codes. It has letters as keys and their equivalent codes as values. codes = { '1' : '[', '2' : '_',

You have dictionary name codes. It has letters as keys and their equivalent codes as values. codes = { '1' : '[', '2' : '_', '3' : ')', '4' : '}', '5' : ']', '6' : '{' } You are required to write a python program that has a function encryptMessage(String) that takes string (having following characters 1, 2, 3, 4, 5, 6) as an argument and returns an encrypted string using above dictionary. You can define and initialize the input string in the main function. Test data: Input string: 2156311 Encrypted: _[]{)[[

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

Step: 3

blur-text-image

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

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago