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

Which of the following is not true about the evolution of biomes?
How do the atoms of a molecule stay together? a. chemical bonds b. magnetic force c. attraction of electrons and neutrons d. through physical changes
True or false? The GCF of an odd and even number is always even
Convert 43.9 grams to centigrams. 439 centigrams 43,900 centigrams 439,000 centigrams 4,390 centigrams
What division problems equal 100
A teen is making iced coffee and would like it sweeter but is unable to get the sugar to dissolve. What method could dissolve more sugar in the iced coffee? a.
Which population and environmental issues are affecting the economy of Indonesia? a. overcrowding and growing drought b. declining population and air pollutio
i need help with math my question is i hope this question doesnt get deleted so my question is which of the following numbers is divisible by 5
if you were asked to express the weight in ounces of a ladybug in scientific notation, would the exponent of the 10 be positive or negative
explain how 18 is an even number