# Python constants

#### [Constants](https://pythonforstarters.solomonmarvel.com/introduction-to-python/broken-reference) <a href="#constants" id="constants"></a>

In Python, a constant is a variable whose value remains unchanged throughout the program. Constants are usually defined in all capital letters so that they can be easily identified.

In Python, there is no built-in support for constants. However, you can define constants in your program by assigning a value to a variable and then not changing the value of the variable.

Here is an example of how to define and use constants in Python:

```
"""
Constants -> Python doesn't support constants, 
but we use the uppercase letters to show 
that it is a constant
"""

WEBSITE_HOST = 'https://solomonmarvel.com'

print(WEBSITE_HOST)


# code example

PI = 3.14159265

def calculate_area(radius):
  return PI * radius * radius

radius = 10
area = calculate_area(radius)
print(f"The area of a circle with radius {radius} is {area}")
```


---

# 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://pythonforstarters.solomonmarvel.com/introduction-to-python/python-constants.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.
