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 Answer

Explanation
Source Link
PkmnQ
  • 2.7k
  • 10
  • 21

Pyth, 95 bytes

A,P>z9hOT%."\ny6¶†Õ8Âù<û¡*SŠÄ™‘uü'iyÃ",GHVtH%." t2aD–ñö«É ?6^ó",hNG;%." t8ݧGeμè‡",HrG4

Try it online!

Will add explanation later.

Explanation

A, # Set...
 P>z9 # ...G to the verb...
 hOT # ...and H to the number of steps.
 %."\ny6¶†Õ8Âù<û¡*SŠÄTM‘uü'iyÃ",GH # Print "How to <G> in <H> easy steps!" with 2 trailing newlines.
 %." t2aD–ñö«É ?6^ó",hNG # Print "Step <N> - Do not <G>."...
 VtH ; # ...H-1 times.
 %." t8ݧGeμè‡",HrG4 # Print "Step <H> - <G>."

Pyth, 95 bytes

A,P>z9hOT%."\ny6¶†Õ8Âù<û¡*SŠÄ™‘uü'iyÃ",GHVtH%." t2aD–ñö«É ?6^ó",hNG;%." t8ݧGeμè‡",HrG4

Try it online!

Will add explanation later.

Pyth, 95 bytes

A,P>z9hOT%."\ny6¶†Õ8Âù<û¡*SŠÄ™‘uü'iyÃ",GHVtH%." t2aD–ñö«É ?6^ó",hNG;%." t8ݧGeμè‡",HrG4

Try it online!

Explanation

A, # Set...
 P>z9 # ...G to the verb...
 hOT # ...and H to the number of steps.
 %."\ny6¶†Õ8Âù<û¡*SŠÄTM‘uü'iyÃ",GH # Print "How to <G> in <H> easy steps!" with 2 trailing newlines.
 %." t2aD–ñö«É ?6^ó",hNG # Print "Step <N> - Do not <G>."...
 VtH ; # ...H-1 times.
 %." t8ݧGeμè‡",HrG4 # Print "Step <H> - <G>."
Source Link
PkmnQ
  • 2.7k
  • 10
  • 21

Pyth, 95 bytes

A,P>z9hOT%."\ny6¶†Õ8Âù<û¡*SŠÄ™‘uü'iyÃ",GHVtH%." t2aD–ñö«É ?6^ó",hNG;%." t8ݧGeμè‡",HrG4

Try it online!

Will add explanation later.

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