Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function called secret in Python that takes a secret alphabet string of 26 unique characters and returns a dictionary that maps each character

Write a function called secret in Python that takes a secret alphabet string of 26 unique characters and returns a dictionary that maps each character to a letter of the alphabet, with the first character mapping to a, the second to b, and so on. You can assume there will be no spaces in the input.

For example an input of SDFGZHh!@mbM*()QWERTYUIOPA would return a dictionary that mapped:

Sa Db Fc

and so on...

def secret(secret_string):

# WRITE YOUR CODE HERE

return # the decoder dictionary

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

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions