# Template "Test with a set of points"

If the user writes "Test" or "Take the test", the bot will offer testing:

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2Fu2ZiBCcbxQRI2VoEecIY%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-10%20%D0%B2%2017.51.27.png?alt=media\&token=64f3b388-aa46-4ac6-8148-995c4270d093)

For each correct answer, we will award points. We will store them in the variable "points" for the test. We reset this variable before starting the test:

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2Fj0RmkVBuILCLIx6SvSoY%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-10%20%D0%B2%2017.52.18.png?alt=media\&token=a11ef3af-2e7f-4680-9532-b83925334477)

Now you can ask the first question.

There are 4 answer buttons for the question. One of them leads to a message about the correct answer and points. All the rest - to the message that the user answered incorrectly. After that, for any outcome, the bot writes the correct answer, waits 10 seconds and moves on to the next question.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FXe4RvSfwz8d0jRoBpkpB%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-10%20%D0%B2%2017.53.36.png?alt=media\&token=96c4a94a-34ab-4891-ae4d-496c602c8fed)

Pay attention to the block with crediting points:

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2F7dHw7B7X4KRK2vRSiEra%2F%D1%82%D0%B5%D1%81%D1%82_%D1%81_%D0%B1%D0%B0%D0%BB%D0%BB%D0%B0%D0%BC%D0%B8_1.png?alt=media\&token=7a3cb5c6-8321-4315-b094-00fa0704bb71)

In double curly braces, you can write any arithmetic expressions with variables, as well as use our special [SmartQuery](https://docs.smartbotpro.ru/smartquery/sintaksis-yazyka) language, in which you can do a variety of things - from arithmetic to processing API return data:

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FTikBjn2oj3MY8kf41odS%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-10%20%D0%B2%2017.49.46.png?alt=media\&token=d1f12599-dee2-40bc-aa62-3b4bdf56d363)

The 2nd question of the test is: “How far (in millions of kilometers) is the Earth from the Sun? Write the approximate number of million km.&#x20;

The user must enter the answer himself. We save the answer in the %Answer to the second question% variable and proceed to the condition: the variable must be in the range from 140 to 160. Then we will assume that the user knows the answer approximately.&#x20;

After that, we follow the familiar pattern: if the answer is correct, we go to the script branch with crediting points. If incorrect, then we say that the user made a mistake and continue:

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FfGS510fF3sUKhs2FUGmy%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-10%20%D0%B2%2017.56.09.png?alt=media\&token=6baf0521-6853-4900-8404-11af2c38e49c)

The 3rd question is: “Which planet from the Sun is the Earth?” Thanks to the “Wait for a response from the user” checkbox, we expect a response in the same block. This allows you not to take extra steps like "Process message" or "Save to variable". After that, we make a condition on the message itself from the user. This condition always works on the last message, which must be equal to "3" for the correct option.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FzMg57tvFbAWGuoLwDUIk%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-10%20%D0%B2%2017.57.41.png?alt=media\&token=b09ec12f-1572-430a-a932-99d83dccf55b)


---

# 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.smartbotpro.io/mini-course/template-test-with-a-set-of-points.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.
