Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Integer Numbers | Familiarizándonos con los Números en Python
Tipos de Datos en Python
course content

Contenido del Curso

Tipos de Datos en Python

Tipos de Datos en Python

1. Familiarizándonos con los Números en Python
2. ¿Verdadero o Falso?
3. Strings
4. Reuniendo Todos los Temas

book
Integer Numbers

You might be accustomed to specifying numbers in ways such as:

  • 1,000,000 (with commas);
  • 1 000 000 (with spaces).

However, Python will not understand this.😢

These formats are understandable for a person but not for a computer, so the right way is 1000000 without commas or spaces.

Tarea
test

Swipe to begin your solution

Here is the distance from the sun to the Earth in miles: var1 = 91,400,000. And here is the distance from the Earth to the moon: var2 = 238 855. You need to adjust these number formats to be compatible with Python.

Rewrite the values of these two distances so they are recognizable by Python.

Solución

Note

If you have a strong desire to use separators, Python understands the following syntax: var = 1_000_000.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 3
toggle bottom row

book
Integer Numbers

You might be accustomed to specifying numbers in ways such as:

  • 1,000,000 (with commas);
  • 1 000 000 (with spaces).

However, Python will not understand this.😢

These formats are understandable for a person but not for a computer, so the right way is 1000000 without commas or spaces.

Tarea
test

Swipe to begin your solution

Here is the distance from the sun to the Earth in miles: var1 = 91,400,000. And here is the distance from the Earth to the moon: var2 = 238 855. You need to adjust these number formats to be compatible with Python.

Rewrite the values of these two distances so they are recognizable by Python.

Solución

Note

If you have a strong desire to use separators, Python understands the following syntax: var = 1_000_000.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 3
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt