justaguy220
justaguy220 justaguy220
  • 02-11-2020
  • Computers and Technology
contestada

How do I add decimals in python?

Respuesta :

Cytokine
Cytokine Cytokine
  • 02-11-2020

x = 0.6

y = 0.4

print(x + y)

This will output 1.0 to the console.

You could also just do:

print(0.6+0.4)

This will yield the same result.

Answer Link

Otras preguntas

\begin{aligned} &3x-2y=-1 \\\\ &y=-x +3 \end{aligned} ​ 3x−2y=−1 y=−x+3 ​ Is (1,2)(1,2)left parenthesis, 1, comma, 2, right parenthesis a solution of th
If x+6>2x+4, which of the following is NOT a possible value for x? part 2
Charles and Lisa were having a watermelon eating contest. They ate twelve slices of watermelon between the two of them. Lisa ate two times as many slices of wat
it says I have 4 cups of white paint for 3 cups of red paint? what is the equivalent for 1 cup of red paint in white paint?​
What was the role of the Office of War Information (OWI)?
What are the short- and long-term impacts of the age of exploration in Africa?
help me plz. I need help ​
When was the first book created?whoever answers it right I will give you 30 points​
How does Shakespeare use imagery to create a mood of evil and foreboding? (Macbeth Act 1 Scene 1)
Find the cost of 80 Orange at 5 for 30 naria