Generate a python user-defined function that accepts string


Problem

Generate a Python user-defined function that accepts a string and a number 'n' representing a shift index and encrypts the string by substituting (ciphering) each alphabetic letter by increasing it by n (wrapping around to the beginning of the alphabet when required).

The function prototype MUST be: def charShifter(userString, n)

For example, if the string was: "abc-xyz", and the shift value was: 3, then the function call:

charShifter("abc-xyz", 3)
would display and return the encrypted string: "def-abc"

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Generate a python user-defined function that accepts string
Reference No:- TGS03306834

Expected delivery within 24 Hours