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 most basic rules of a government within a society
Why was Islam more successful than Christianity in acquiring converts?
Andy views beer and pizza as complements to one another. If the price of pizza decreases, economists would expect: A. Andy's demand for pizza to increase B. And
A model rocket is constructed with a motor that can provide a total impulse of 25.0 N·s. The mass of the rocket is 0.203 kg. What is the speed that this rocket
George Beadle and Edward Tatum used mutant strains of Neurospora to formulate the one-gene-one-enzyme hypothesis. Researchers later updated this hypothesis to p
What does play do for the brain?
Suppose that the "fabulous" phenotype is controlled by two genes, A and B, as shown in the diagram below. Allele A produces enough enzyme 1 to convert "plain" t
If you had lived in the 1300s, would have believed Marco Polo stories
HELPPP ME ASAP PLEASEEEEE :,C Which detail from the text best helps support the theme that friendship is more important than treasure? A.) Bilbo gives the A
{x | x < 2} how do I solve this