⁵ṁX€’©+OỌ,®Y⁵ṁX€’Ṅ+OỌ
Try it online!Try it online!
How it works
⁵ṁX€’©+OỌ,®Y⁵ṁX€’Ṅ+OỌ Main link. Argument: s (string)
⁵ Set the return value to 10.
ṁ Mold; create an array of 10's with the length of s.
X€ Pseudo-randomly pick a integer between 1 and 10, for each 10.
’ Decrement, so the integers fall in the range [0, ..., 9].
©Ṅ CopyPrint the resultkey, toas thean registerarray, followed by a linefeed.
+O Add the integers to the ordinals (code points) of s.
Ọ Unordinal; convert back to characters.
,® Pair the result with the key.
Y Join, separating by a linefeed.