Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Floating Point Numbers | Numeric Types
Python Data Types

Deslize para mostrar o menu

book
Floating Point Numbers

It is time for floating point numbers.

A floating point number is a number with decimal places, so floating point number has an integer part, and a fraction. For example, 65.3, -0.04, 1000.01 are all floating point numbers.

Input:
# Creating floating point numbers and check the type of the created object
x = 100.12
y = -5.5632
z = -12350.0

print(f'It`s x: {x}, the type of x is {type(x)}')
print(f'It`s y: {y}, the type of y is {type(y)}')
print(f'It`s z: {z}, the type of z is {type(z)}')

Output:
It`s x: 100.12, the type of x is <class 'float'>
It`s y: -5.5632, the type of y is <class 'float'>
It`s z: -12350.0, the type of z is <class 'float'>
Tarefa

Swipe to start coding

Create three variables : a, b, c with the following values: 0.06, -5.0, 985.5067 and check the type of this object.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 3
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

Awesome!

Completion rate improved to 3.85

book
Floating Point Numbers

It is time for floating point numbers.

A floating point number is a number with decimal places, so floating point number has an integer part, and a fraction. For example, 65.3, -0.04, 1000.01 are all floating point numbers.

Input:
# Creating floating point numbers and check the type of the created object
x = 100.12
y = -5.5632
z = -12350.0

print(f'It`s x: {x}, the type of x is {type(x)}')
print(f'It`s y: {y}, the type of y is {type(y)}')
print(f'It`s z: {z}, the type of z is {type(z)}')

Output:
It`s x: 100.12, the type of x is <class 'float'>
It`s y: -5.5632, the type of y is <class 'float'>
It`s z: -12350.0, the type of z is <class 'float'>
Tarefa

Swipe to start coding

Create three variables : a, b, c with the following values: 0.06, -5.0, 985.5067 and check the type of this object.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

close

Awesome!

Completion rate improved to 3.85

Deslize para mostrar o menu

some-alt