# 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.&#x20;

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.

   <figure><img src="/files/96DUgXNnnLXAiZQG3HQd" alt=""><figcaption></figcaption></figure>
2. Look for the **Create Item** button and click it. This will open a big popup window to create your very own item.

   <figure><img src="/files/b64JDisoxkaLU7XBfn60" alt=""><figcaption></figcaption></figure>
3. Select **Console application** as the item type.

   <figure><img src="/files/cS4m4qa9nKh2MQ3dABKw" alt=""><figcaption></figcaption></figure>
4. Provide an item name and a description on what the item is all about. Be as detailed as possible.

   <figure><img src="/files/JEtncPn1hgGuRMtU9Lj1" alt=""><figcaption></figcaption></figure>
5. Select all programming languages that can be used to solve the item.

   <figure><img src="/files/2dc6UgQEHrIz6NaGpGg0" alt=""><figcaption></figcaption></figure>
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:

   <figure><img src="/files/ylivS9pQ1tYy4eMtM6uh" alt=""><figcaption></figcaption></figure>

   * **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.

     <figure><img src="/files/KYqwxEtb12zsXrVeLLrM" alt=""><figcaption><p>   </p></figcaption></figure>

     <figure><img src="/files/4A72Gg5gzdMynuKlUIlQ" alt=""><figcaption><p>   </p></figcaption></figure>

     <figure><img src="/files/AhQ9xfa1taUizcpLxvTw" alt=""><figcaption></figcaption></figure>
   * **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.

     <figure><img src="/files/6cc7OJi0iAcMbbzbootS" alt=""><figcaption><p>   </p></figcaption></figure>

     <figure><img src="/files/CAPVmJFf5fUasi4rHPli" alt=""><figcaption><p>   </p></figcaption></figure>

     <figure><img src="/files/dPgkXrKoVa1ZmAHqqgoF" alt=""><figcaption><p>   </p></figcaption></figure>

     <figure><img src="/files/KaJ3jl88IlA7hZHq6mU8" alt=""><figcaption></figcaption></figure>
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.

     <figure><img src="/files/g8RXM2xWRtLFJRb3FdFz" alt=""><figcaption></figcaption></figure>
   * **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.

     <figure><img src="/files/AKTaBalFhyPSrLghaERA" alt=""><figcaption></figcaption></figure>
8. Once done, click **Create Item.** It should show a popup window informing that you have successfully created your own item!&#x20;

   <figure><img src="/files/cM6c8MXx1uJveyvNMGNF" alt=""><figcaption></figcaption></figure>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.codechum.com/teachers/more-features-you-may-want-to-explore/items-section/how-to-create-an-item/how-to-create-a-console-based-item.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
