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 are negative consequences of industrialization
What electrical charge is present in the balloons??
Which method would be effective for separating salt and water in a mixture?
explain the goal of benjamin franklin albany plan of union
round 23 miles per hour to the nearest ten miles per hour
Which of the following sentence structures needs at least one independent clause and one subordinate clause? a. complex sentence b. compound sentence c. run-
Garcia company is a perfectly competitive firm. the market price of its output is $10. the firm is currently producing 100 units of output. at this level of out
At a dog shelter, a 2 pound bag if dog food will feed 36 dogs a day. how many dogs would you expect to feed with a 16 pound bag of dog food?
A 200-n sled of slides down a frictionless hillside that rises at 37â° above the horizontal. what is the magnitude of the force that the surface of the hill exe
When the Moon moves between the Sun and Earth and casts a shadow on Earth's surface, there is a(n) a. lunar eclipse. b. full Moon. c. new Moon. d. solar eclips