> For the complete documentation index, see [llms.txt](https://pythonforstarters.solomonmarvel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pythonforstarters.solomonmarvel.com/introduction-to-python/python-numbers.md).

# Python numbers

#### [Numbers](broken://pages/j1c0z2APMJ19QosL6O12) <a href="#numbers" id="numbers"></a>

Python has three built-in numeric data types: integers, floating-point numbers, and complex numbers. In this section, you'll learn about integers and floating-point numbers, which are the two most commonly used number types. You'll learn about complex numbers in a later section.

```
# numbers.py - file name

number = 1
decimal_number1 = .5
decimal_number2 = 10.5

# you can use the underscores to make the numbers more visible when coding
# The underscores will not be added to the output
salary = 21_500_000

pi = 3.142
r = 5

# simple arithmetic operation using python number type
area = pi * r ** r
print(area)
```

To run the code, simply open your `terminal` for Mac OS users, `command prompt` or `powershell` for Windows OS users and run the following command:

```
python numbers.py
```


---

# 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:

```
GET https://pythonforstarters.solomonmarvel.com/introduction-to-python/python-numbers.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.
