# pi

## Description

Get the value of pi, which is the ratio of the circumference of a circle to its diameter. The output will return approximately 3.14159.

## Input / Parameter

N/A

## Output

| Description              | Output Type |
| ------------------------ | ----------- |
| Returns the value of pi. | Number      |

## Example

In this example, we will call the `pi` function and print the value in the console.

### Steps

1. Drag a `button` component into the canvas and open the `Action` tab. Select the `press` event of the button and drag the `Log.write` function to the event flow.
2. Call the function `Math.pi` inside the `Log.write` function.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-5fd837aa8abd2fea7d4a1ad4382d9cc593370577%2Fpi-step-1.png?alt=media)

### Result

1. The console will print the value of pi.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-200c2103724aec7a10535959b1bb78cfc48b0a3a%2Fpi-result-1.png?alt=media)
