int() Function

Rounds the specified number down to the nearest integer.

Syntax

int( number )

number: (Decimal) The number that will be rounded.

Returns

Integer

Examples

You can experiment with this function in the test box below.

Test Input

int(31.5) returns 31

Open in Github

On This Page

FEEDBACK