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

The value square root of 53 of lies between which two consecutive integers?
which factor made the most difference in how agriculture affected the economies of the colonies?
An airplane travels 3,260 kilometers in 4 hours. What is the airplane’s average speed?
Which of the following statements is true concerning LUCA? (1) LUCA was a cell. (2) All life on Earth evolved from LUCA. (3) LUCA probably existed probably arou
Find the value of x.  Round to nearest hundredth if necessary.
Jim’s allowance is $1.20 per week. Stan’s is 25¢ per day. How long will they have to save, if they save both their allowances together, before they can get a m
How do you Factor c(squared)-8c ??
If a slope of a line is 2/0 is it 0 or undefined?
Alicia estimates that the surface area of a rectangular prism with a length of 11 meters,a width of 5.6 meters,and a height of 7.2 meters is about 334 cubic met
Dominick lives 1 3/4 miles from his school.  If his mother drives him half the way, how far will Dominick have to walk to get to school?