Skip to main content
added 248 characters in body
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Charcoal, 1010 9 bytes

↓E⮌θ◧ι⊕‽Lθ↑Eθ◧ι⊕‽Lθ

Try it online!Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @ASCII-only. Explanation:

   θ         Input string
  ⮌         Reversed
 E          Map over characters
         θ   Input string
     Length
      Random value
       Incremented
     ι       Current character
         Padded to length
           Print rotated

InsteadAs ASCII-only points out, you can move the letters randomly up instead of reversing and rotatingdown for the output cansame effect (except that there might be printedextra white space at the bottom rather than the top). Printing an array of characters upwards is equivalent to printing a string normally and reflected afterwards for, so the same byte countpadding then just offsets each character vertically by a random amount.

Charcoal, 10 bytes

↓E⮌θ◧ι⊕‽Lθ

Try it online! Link is to verbose version of code. Explanation:

   θ        Input string
  ⮌         Reversed
 E          Map over characters
         θ  Input string
        L   Length
       ‽    Random value
      ⊕     Incremented
     ι      Current character
    ◧       Padded to length
           Print rotated

Instead of reversing and rotating the output can be printed normally and reflected afterwards for the same byte count.

Charcoal, 10 9 bytes

↑Eθ◧ι⊕‽Lθ

Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @ASCII-only. Explanation:

  θ         Input string
 E          Map over characters
        θ   Input string
       L    Length
      ‽     Random value
     ⊕      Incremented
    ι       Current character
   ◧        Padded to length
           Print rotated

As ASCII-only points out, you can move the letters randomly up instead of down for the same effect (except that there might be extra white space at the bottom rather than the top). Printing an array of characters upwards is equivalent to printing a string normally, so the padding then just offsets each character vertically by a random amount.

Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Charcoal, 10 bytes

↓E⮌θ◧ι⊕‽Lθ

Try it online! Link is to verbose version of code. Explanation:

   θ        Input string
  ⮌         Reversed
 E          Map over characters
         θ  Input string
        L   Length
       ‽    Random value
      ⊕     Incremented
     ι      Current character
    ◧       Padded to length
↓           Print rotated

Instead of reversing and rotating the output can be printed normally and reflected afterwards for the same byte count.