Creating a Code Snippet Questions :


To create your own coding question:


1. Click on Add Question tab, then click on Application based questions and then select Code Snippet Question and after that select the topic name in which you want to add the question.


2. In the consecutive screen that opens up, provide the question details and specify the difficulty level of the questions.


3. Add the question specific information in the fields provided. Here's what the various fields are, encountered while creating a coding question and their significance :

  • Question Title: Enter question-specific instructions here.

  • Question Text: Enter the question text here.

  • Function Name: Specify the name of the function for which the candidate is expected to write code. This
    function name appears in the system-generated template visible in the coding window where the candidate
    is to write code.

  • Input Types: Specify the expected input types here (ex: int, float etc). 

  • Output Types: Specify the expected output types here.

  • Difficulty Level: Assign a difficulty level for your question.

  • Show Default Results to Candidates: Select this option in case you want to show the candidates whether
    their code passes the default test case defined by you when they click on the “Check Code” button.

  • Scoring Settings: Select this option in case you want to specify your own scoring settings for the questions.

  • Add test case: Click to add the test cases on the basis of which the candidate’s code will be evaluated.

  • Test case fields:

  1. Testcase Index : Serial number of the testcase


  2. Testcase Title : Title of the testcase


  3. Testcase Description : Description of the testcase


  4. Testcase Marks : Marks assigned to the testcase


  5. Testcase Type : Type of the testcase. You can choose this from the testcase type drop-down.


  6. Testcase Input Values : Input values of the testcase


  7. Testcase Expected Values : Expected output values corresponding to the input values specified.


4. Once done, click on “Save” to save your changes.


5. The question gets added to your question bank.


For details, please refer the GIF below;