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

What is the meaning of Pangaea
Can someone help me in probability?Amanda wrote a computer program that generates two random numbers between one and eleven.When she runs it,what is the probabi
what is 20% of $45.00?
y varies directly as x. if x=5 when y=12 find x when y=30
the length of a rectangle is 3 feet less than twice the width of the rectangle. if the perimeter of the rectangle is 324 feet, find the width and the length?
Evolution is: A) A change in the composition of a population from one generation to the next.B) A phenomenon that must be inferred from evidence, because it can
What is the 54th element on the periodic table?
how does the carbon cycle work in the desert
What is the Geocentric theory in your own words?
How did the alliances that formed in Europe after world war 2 form an "iron curtain" as described by Winston Churchill in a 1946 speech?