# Introduction to Python

Coding or **programming** is the process in which we give certain instructions to our computer so that it can perform a task, such as calculating something.&#x20;

A **programming language** is a language that we can use to tell the computer what to do. Just like every other language, it has rules of its own about how to write code. It gives us the guidelines for the layout of words and symbols for any task we might want the computer to do. You can think of it as any language such as English, Spanish, or Chinese. It tells us what format, structure, and syntax we have to use so that the computer will do what we want it to do.

![\`](/files/-L_upDeddPSTydxuKXIB)

**Python** is one of the many programming languages that exist, and is the main programming language we will use during this course. It is a general-purpose programming language that is not only used in data analysis and visualization, but also to develop web apps.

We will be using Python as a tool to process and analyze data. To get started, let's discuss the basics of Python's format.&#x20;

In the last section, we showed the command line, and how the computer is waiting for you to tell it what to do. When the computer is ready for you to type, it will display three arrows that look like this: `>>>` . You will not need to type these arrows, they will appear automatically. Here is a picture of what they will look like in the command line.

![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LI4U9TmkUP7l74ZHrH0%2F-LJ-a0EFnI3a--puDRRc%2F-LJ-aZouXDDv7hg0ijUM%2Fimage.png?alt=media\&token=ed735c4a-5234-4960-8d65-3af297530a56)

These arrows show up when the computer is ready for you to type something. If there are no arrows, then the computer is working on what you last wanted it to do.&#x20;

However, when we use the Jupyter Notebooks, these arrows will be invisible. Instead, the command line will look like this:

![](/files/-L_urFx1pbmQQOLNJwKs)

In our examples, we will type the arrows, but they are not necessary in Jupyter.

Before we start, any code, let's see what happens when we input information into the command line:

```python
>>> 2
2

>>> 4000000
4000000
```

In the example above, Python takes the input after the prompt `>>>` , evaluates it, and displays whatever the input evaluates to in the next line. We will get to more complicated examples as we continue. For now, know that Python takes in an input where there is a prompt `>>>` and displays the output in the next line.

## Glossary

**Syntax** in a language is a set of rules that tell us how we can correctly combine words or symbols in order for the computer to understand what we want it to do.

**Input** is the information we give our computer so that it can do the task we asked it to do.

**Output** is the result of the task that the computer will give back to us once it is finished.


---

# 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://otd.gitbook.io/book/module-1/introduction-to-python.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.
