Karaca’s Encryption

A red apple
Photo by an_vision on Unsplash
Make a function that encrypts a given input with these steps:Input: “apple”Step 1: Reverse the input: “elppa”Step 2: Replace all vowels using the following chart:a => 0e => 1i => 2o => 2u => 3# “1lpp0”Step 3: Add “aca” to the end of the word: “1lpp0aca”Output: “1lpp0aca”
Solution to code for “apple”
Solution for “apple”
string.maketrans(x,[y,[z]]) ) 
Translation Table and Translated String
Original String and Translated String

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store