Run Code
run_codeExecutes code snippets in 24 languages on HackerEarth's cloud servers and returns printed output or errors. Requires HACKEREARTH_KEY; use to test code and see real output.
Instructions
Executes a snippet of code on HackerEarth's cloud servers in any of 24 languages. Use when the user wants to test code, see real output instead of predicted output, or check whether a program works. Needs the code and the language identifier, call list_languages if unsure of the exact name. Requires HACKEREARTH_KEY to be set; every run consumes the key owner's HackerEarth API quota. Returns the program's printed output and any error messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| language | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |