Gemini · Code

Gemini codegen

Code generation with tests and constraints.

All topics / Gemini prompts

Replace highlighted brackets, then copy.

Generate code in [language] to do [task]. Include a short example input/output and a minimal test snippet. Follow style: [guide].
  • language - replace the bracketed field with your info
  • task - replace the bracketed field with your info
  • guide - replace the bracketed field with your info
  • Language
  • Task
  • Style guide
  • Env/runtime
  • Code
  • Example IO
  • Test snippet
  • Keep dependencies minimal.
  • Note complexity if relevant.
  • Provide comments only if non-obvious.