about | help | code help+videos | done | prefs |
Write a method that "scrambles" a string of lower-case letters, 'origText' using a key, 'key'. The key will contain every lower-case letter from "a" to "z" exactly once, but in any order. The key is used to convert the 'origText' into a coded message by replacing every letter in 'origText' by the letter immediately following that letter in 'key'. Look at the test data for specific examples. test2023_12_07_SLHL_scramble("test", "zyxwvutsrqponmlkjihgfedcba") → "sdrs" test2023_12_07_SLHL_scramble("thegame", "abcdefghijklmnopqrstuvwxyz") → "uifhbnf" test2023_12_07_SLHL_scramble("testing", "qwertyuiopasdfghjklzxcvbnm") → "yrdyomh" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy