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

Conteúdo do Curso

Python Data Types

Python Data Types

1. Numeric Types
2. Boolean Type
3. Strings

bookComplex Numbers

What are complex numbers and how are they represented in Python? A complex number is a number that is the sum of the real and imaginary parts. In Python, the real part is represented by an ordinary int or float, and the imaginary part is an int or float with a suffix j. Let's look at examples, so that it becomes clearer for us.

Using .real, we can get the real part of any complex number, using .imag method, we can get the imaginary part.

Tarefa

Create one variable: a with the following value: -7+3j. Check the type of this object. And display the real and imaginary parts of this number.

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 4
toggle bottom row

bookComplex Numbers

What are complex numbers and how are they represented in Python? A complex number is a number that is the sum of the real and imaginary parts. In Python, the real part is represented by an ordinary int or float, and the imaginary part is an int or float with a suffix j. Let's look at examples, so that it becomes clearer for us.

Using .real, we can get the real part of any complex number, using .imag method, we can get the imaginary part.

Tarefa

Create one variable: a with the following value: -7+3j. Check the type of this object. And display the real and imaginary parts of this number.

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 4
toggle bottom row

bookComplex Numbers

What are complex numbers and how are they represented in Python? A complex number is a number that is the sum of the real and imaginary parts. In Python, the real part is represented by an ordinary int or float, and the imaginary part is an int or float with a suffix j. Let's look at examples, so that it becomes clearer for us.

Using .real, we can get the real part of any complex number, using .imag method, we can get the imaginary part.

Tarefa

Create one variable: a with the following value: -7+3j. Check the type of this object. And display the real and imaginary parts of this number.

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!

What are complex numbers and how are they represented in Python? A complex number is a number that is the sum of the real and imaginary parts. In Python, the real part is represented by an ordinary int or float, and the imaginary part is an int or float with a suffix j. Let's look at examples, so that it becomes clearer for us.

Using .real, we can get the real part of any complex number, using .imag method, we can get the imaginary part.

Tarefa

Create one variable: a with the following value: -7+3j. Check the type of this object. And display the real and imaginary parts of this number.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 1. Capítulo 4
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
some-alt