# 4.2.1 作答方式

在每一題目的下方都會有作答區，作答題目可使用2種方式：

* 透過［匯入程式碼］按鈕，上傳電腦中的程式碼檔案，再按【送出答題】
* 直接在此區域鍵入程式碼，再按【送出答題】

![作答方式](/files/zvDFcUGzcwwQT1Uac3kL)

***

【執行程式碼】

讓您的程式碼在Code Judger平臺線上執行，您一樣可以透過上述的操作方式，將程式碼載入！

程式碼載入後，點選【執行程式碼】，即會顯示執行結果。

例1：

如您鍵入的程式碼(Python)，如下圖

![正確的程式碼](/files/43R4UeKe8VfO2IW48KzC)

在點選【執行程式碼】，即會顯示執行結果

![執行結果](/files/1bKHdWFRw2gIPXveMQgV)

> 注意 如您的程式是需要鍵輸入值時，請記得在【執行程式碼輸入值】區塊中，輸入您的輸入值，再點選點選【執行程式碼】。 若無輸入值可不填寫 (不適用【讀寫檔案】、【輸出圖表】題型)

***

例2：

如您鍵入的程式碼有問題(Python)，如下圖，輸出了一個沒有定義的變數

![錯誤的程式碼](/files/pvrt6squwOU4sYK2S4dy)

在點選【執行程式碼】，即會顯示執行程式碼時，在那一行發生了什麼問題。(stacktrace)

![執行結果](/files/fTYoe6spQFSeMFSQfDh0)


---

# 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://csfrd.gitbook.io/cjmanualv2/chapter04/practice/judge.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.
