Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

9 of 12
added 23 characters in body
Gymhgy
  • 8k
  • 12
  • 35

C# (Visual C# Interactive Compiler), 182 bytes

s=>{int y=new Random().Next(10)+1,i=0;for(Write($"How to{s=s[8..^1]} in {y} easy step{(y<2?"":"s")}!\n\n");i++<y;)Write($"Step {i} - {(i<y?$"Do not"+s:(char)(s[1]^32)+s[2..])}.\n");}

-1 byte thanks to Dominic van Essen

+13 bytes due to having to remove the "s" in steps if the random number = 1.

-1 byte due to Julian

Try it online!

Gymhgy
  • 8k
  • 12
  • 35

AltStyle によって変換されたページ (->オリジナル) /