Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi I need help with one of my review assignments. This is in python. # function name: shift_cipher_decode # inputs: string - string to encode

Hi I need help with one of my review assignments. This is in python.

# function name: shift_cipher_decode

# inputs: string - string to encode (str)

# n - amount to shfit by (int)

# output: the decoded string

# assumptions: There can be non-alphabet characters. You must leave these alone

# Should be able to accommodate upper and lower case letters

# restrictions: DO NOT USE A DICTIONARY TO ENCODE

#YOUR LETTERS

Basically im supposed to code a decoder in a function where a print statements gives a string and a shifter. With this shifter you are supposed to move the characters of the string in ascii according to the number of shifts. For example here is an output for example this string should convert to pineapples after its conversion in ascii. However I get confused on how to analyze the string and shift it with any possible test case. If you can help me out it would be greatly appreciated

# pineapples

print(shift_cipher_decode("buzqmbbxqe", 12))

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

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions

Question

create departmrnt table without rimary key constraint

Answered: 1 week ago

Question

What is the relationship between diversity, inclusion, and equity?

Answered: 1 week ago