Multiplication
To multiply numbers we will use operator *. We can multiply numbers with each other of any numeric type.
Input:
num_1 = 25 + 8j
num_2 = 3
multiplication = num_1 * num_2
print(f'The multiplication of {num_1} and {num_2} is {multiplication}')
Output:
The multiplication of (25+8j) and 3 is (75+24j)
Input:
num_1 = 13.6
num_2 = 3.5
multiplication = num_1*num_2
print(f'The multiplication of {num_1} and {num_2} is {multiplication}')
Output:
The multiplication of 13.6 and 3.5 is 47.6
Input:
num_1 = 4
num_2 = 3.2
multiplication = num_1*num_2
print(f'The multiplication of {num_1} and {num_2} is {multiplication}')
Output:
The multiplication of 4 and 3.2 is 12.8
Tarea
Swipe to start coding
You have 2 complex numbers, multiply them.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 8
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Suggested prompts:
Resumir este capítulo
Explicar el código en file
Explicar por qué file no resuelve la tarea
Awesome!
Completion rate improved to 3.85
Multiplication
Desliza para mostrar el menú
To multiply numbers we will use operator *. We can multiply numbers with each other of any numeric type.
Input:
num_1 = 25 + 8j
num_2 = 3
multiplication = num_1 * num_2
print(f'The multiplication of {num_1} and {num_2} is {multiplication}')
Output:
The multiplication of (25+8j) and 3 is (75+24j)
Input:
num_1 = 13.6
num_2 = 3.5
multiplication = num_1*num_2
print(f'The multiplication of {num_1} and {num_2} is {multiplication}')
Output:
The multiplication of 13.6 and 3.5 is 47.6
Input:
num_1 = 4
num_2 = 3.2
multiplication = num_1*num_2
print(f'The multiplication of {num_1} and {num_2} is {multiplication}')
Output:
The multiplication of 4 and 3.2 is 12.8
Tarea
Swipe to start coding
You have 2 complex numbers, multiply them.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Awesome!
Completion rate improved to 3.85Sección 1. Capítulo 8
single