[Home](./index.md) > [bitburner](./bitburner.md) > [CodingContract](./bitburner.codingcontract.md) > [attempt](./bitburner.codingcontract.attempt.md) ## CodingContract.attempt() method Attempts to solve the Coding Contract with the provided solution. Signature: ```typescript attempt(answer: string | string[] | number, fn: string, host?: string): boolean; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | answer | string \| string\[\] \| number | Solution for the contract. | | fn | string | Filename of the contract. | | host | string | Host or IP of the server containing the contract. Optional. Defaults to current server if not provided. | Returns: boolean True if the solution was correct, false otherwise. ## Remarks 10 GB