Custom Coding Question - Advanced

Modified on Sun, 16 Nov at 10:09 AM

Custom Coding Question - Advanced

Introduction


Our platform allows you to add customized questions and incorporate them into your assessments. This guide walks you through creating and managing custom coding questions step-by-step.


Getting Started


To begin, navigate to the Private Questions tab and click the Add Coding Question button. This action will take you to the question creation page.



Adding Coding Questions - Advanced


In this option, you can manually provide the code components for the question:

  • The function(s) to be implemented by the candidate.
  • The checker function, which validates the candidate's code.
  • Additional helper classes (optional) that candidates can use in their solution.



For this tutorial, we will demonstrate how to add a C++ coding question that simulates a calculator’s add function.


Step 1: select the topic name



Step 2: Select Question Difficulty


Start by choosing the appropriate difficulty level for the question.




Step 2: Select the programming language




Step 3: Press on advanced


Step 4: Fill the header file


The header file contains the method signature of the coding task.



Example:



Once done, press Save.


Step 5: Fill the candidate source file


The candidate source file is the code template which the candidate will get to implement.

Note: make sure to add a return statement (it is for compilation verification needs, the service will remove it later).




Once done, press Save.


Step 7: Add test case checkers



The test case checker is the component responsible for verifying whether the candidate’s solution works correctly.

It calls the candidate's function with input values, evaluates the returned result, and determines whether the behavior is correct.


If the candidate’s code passes validation, the checker returns an exit code of 0.

If the result is incorrect or an error occurs, it returns exit code 1.


For example:




You can have multiple test checkers.




Step 7 (Optional): Add Solution Code


To include a reference solution, click the Add Solution Code button and provide the solution code. 

  • The platform will validate the solution code against the test cases you provided.
  • If the solution does not pass all test cases, you'll receive a warning to help you debug the issue.

You can provide a solution code to verify your question is working well.



Example:



By pressing Save the service will verify the code is working well.


Step 8: Fill the question's body




Step 9: Save the Question


  • Once you've completed the steps above, press the Save button to finalize and add the coding question to your assessment library.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article