How to create a Console-based item

Introduction

Console-based item is a type of item in which your students have to code within CodeChum and submit them for automatic checking.

CodeChum already has tons of built-in console-based item that you are free to use, but if you'd like to make your own item to use in an activity in CodeChum, you can make your own!

Steps

To create a console-based item in CodeChum, follow these steps:

  1. Click on Item Bank. This will redirect you to a screen listing all items you have created within CodeChum.

  2. Look for the Create Item button and click it. This will open a big popup window to create your very own item.

  3. Select Console application as the item type.

  4. Provide an item name and a description on what the item is all about. Be as detailed as possible.

  5. Select all programming languages that can be used to solve the item.

  6. Add test cases for this item. This will be used to check if the given test case's output will be the same as the students' outputs and will give a score if they are the same. There are two ways to do this:

    • Auto-generate solution with AI - Codechum will automatically generate a solution and test cases based on your item description in step 2. This does not mean that your students' answers should be the same as this one, this will only be used to produce correct test cases.

    • I will provide my own solution - You will manually provide a sample solution code for this item. Once finalized, click on the Run to add a test case button. This will open a terminal that runs the code you provided. Review the code and close the terminal when you're done; your test cases will now be added. Repeat this process to create as many test cases as you want. Please note that your students' answers do not need to be the same as this one; this is solely used to generate correct test cases.

  7. Finally, if you'd like, you can add additional settings for your item, such as:

    • Minimum Requirements - lets you set conditions or constraints so that if any of the set requirements are unmet, the students will not get a score for the item. This is especially useful if you want students to use the things they should have learned in the discussion, like functions or statements.

    • Initial Code - lets you set an initial code that the students will see immediately after starting to answer the item. This is useful when you want to set ready-made functions or statements and your students will only need to complete the code.

  8. Once done, click Create Item. It should show a popup window informing that you have successfully created your own item!

And that's how to make console-based items in CodeChum!

Last updated