> For the complete documentation index, see [llms.txt](https://gilmour.online/compsci/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gilmour.online/compsci/robotics-7/python-basics-trinket.io.md).

# Python basics (trinket.io)

## Video 1

{% embed url="<https://youtu.be/m1DSfS5sEkc>" %}

### Terms:

**Variables:** Words that can store data. A variable might store a number, a word, a sentence or a list of things.

**Operators:** Basic math symbols for addition, subtraction, multiplication and division **(+, -, \*, /)**

**Functions:** Commands which let us do things within the programs. Some functions are built in and some will be created by us!

## **Video 2**

{% embed url="<https://youtu.be/gt0Q7xKyb70>" %}

### Terms:

**Input:** Getting information from outside the program. This might come from someone using your program in the case of an app, or from sensor data in the case of a robot.

**Changing Variable Types:** Sometimes we have to change variable types to allow them to interact. We do this with functions int() and str(). Remember that variables need to be alike if we want them to be able to interact!

## **Video 3**

{% embed url="<https://youtu.be/jUXpzNsIuto>" %}

### Terms:

**Conditionals:** Conditionals let us check for when something happens or when something is true. The most common of these is an if statement (which can be expanded to an if/else or and if / elif / else statement).

**Boolean:** A boolean is a specific type of variable, a True or False variable.

## Assignment!

{% embed url="<https://youtu.be/2i-wtoeMN1U>" %}


---

# 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 dynamically by asking a question.

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

```
GET https://gilmour.online/compsci/robotics-7/python-basics-trinket.io.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
