> For the complete documentation index, see [llms.txt](https://digitalgarden.batamladen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://digitalgarden.batamladen.com/notes/programming/python/examples-projects/rock-paper-scissors.md).

# Rock, Paper, Scissors

{% tabs %}
{% tab title="main.py" %}

```python
import random

rock = '''
    _______
---'   ____)
      (_____)
      (_____)
      (____)
---.__(___)
'''

paper = '''
    _______
---'   ____)____
          ______)
          _______)
         _______)
---.__________)
'''

scissors = '''
    _______
---'   ____)____
          ______)
       __________)
      (____)
---.__(___)
'''


human_sign = " "
comp_sign = " "
result = ["Draw", "You Win", "Comp Wins"]


choice = int(input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors.\n: "))

if choice == 0:
    human_sign = rock
elif choice == 1:
    human_sign = paper
elif choice == 2:
    human_sign = scissors
else:
    print("Invalid input")


comp_choice = random.randint(0, 2)

if comp_choice == 0:
    comp_sign = rock
elif comp_choice == 1:
    comp_sign = paper
elif comp_choice == 2:
    comp_sign = scissors
else:
    print("Invalid input")

print("You:\n" + human_sign)
print("Comp:\n" + comp_sign)


def result_calculation():
    result_index = (choice - comp_choice + 3) % 3
    return result[result_index]

print (result_calculation())
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUwIKQPujWqWSVFxQaX98%2Fuploads%2F0rHyHE2axkHvbTDsNSsT%2F0705(3).mp4?alt=media&token=b5a3bb01-4913-4199-aed8-934c7fb7adf1>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://digitalgarden.batamladen.com/notes/programming/python/examples-projects/rock-paper-scissors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
