# Calculated

![](/files/gNwxKsFWHqHwMq8KRBzo)

คำถามรูปแบบ Calculated จะคล้ายกับคำถามแบบ Numerical แต่ตัวเลขที่มีในคำถามจะถูกสุ่มขึ้นมาใช้ และสามารถตั้งค่าตัวแปรได้ เช่น "จงหาพื้นที่สี่เหลี่ยม" เมื่ออาจารย์สร้างคำถามและกำหนดตัวแปรจำนวน 2 ตัว คือ {ฐาน} และ {สูง} (โดยตัวแปร "ฐาน" และ "สูง" นี้จะเป็นตัวอักษรอื่นก็ได้) จากนั้นนำไปกรอกในช่อง "Correct Answer Formula=" ก็จะได้คำถาม Calculated มาใช้ เมื่อน.ศ.เข้าทำข้อสอบ ระบบจะสุ่มตัวเลขที่เป็น {ฐาน} และ {สูง} มาให้ น.ศ.จะต้องเลือกใช้สูตรให้ถูกต้อง และกรอกคำตอบลงไป ระบบจะให้คะแนนจากผลลัพธ์ที่ได้จากส฿ตรที่อาจารย์ได้กรอกไว้ใน "Correct Answer Formula"

![หน้าต่างการตั้งค่า Answer](/files/FxhZeHbUmiWyQvGaTcnr)

### Answer

* Answer 1 formula= ตั้งค่าสูตรที่จะใช้กับโจทย์ข้อดังกล่าว
* Grade คะแนนที่น.ศ.จะได้เมื่อตอบคำถามข้อนี้ถูก
* Tolerance ค่าความคาดเคลื่อนที่อาจเกิดขึ้นได้ในโจทย์คำนวนบางประเภท โดยจะมีให้เลือกใช้ 3 ประเภทคือ Relative , Nominal และ Geometric
  * Relative คือค่าความคลาดเคลื่อนที่คำนวนโดยการคูณกับคำตอบที่ถูกต้อง
  * Nominal เป็นค่าความคลาดเคลื่อนที่ง่ายที่สุดและส่วนต่างที่คลาดเคลื่อนไปจะไม่มากนัก
  * Geometric ขีดจำกัดบน-ล่าง เหมาะกับโจทย์คำนวนที่มีความซับซ้อนสูง โดยจะใช้ค่าความคลาดเคลื่อนสัมพัทธ์ = 1 หรือมากกว่าเป็นขีดจำกัดบนก็ได้ ส่วนของขีดจำกัดล่างจะไม่มีการตั้งไว้เพราะระบบจะตั้งค่าให้เป็น 0 ทุกกรณี

{% hint style="info" %}
ข้อควรระวัง อย่าใส่ = (เครื่องหมายเท่ากับ) ในช่อง formula
{% endhint %}

![ส่วนของ Unit handling และ Units จะมีเหมือนกับโจทย์ประเภท Numerical](/files/EBprFHpdQAc50M0SZ5LV)


---

# 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://docs.tlic.cmu.ac.th/cmumoodle-manual/quiz/creating-quiz/question-type/calculated.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.
