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

How many solutions exist for the equation cos 2θ − sin θ = 0 on the interval [0, 360°)?
An experiment consists of drawing two coins out of a jar one at a time without replacement. The jar contains 1 penny, 1 nickel, 1 dimand 1 quarter.Which of the
Write an equation of the form y = mx for the line shown below. If appropriate,use the decimal form for the slope.(4,3)
You have 3 black cups, 10 Green cups, 9 purple cups, and 19 gray cups. what is the ratio between purple and green cups?
write the inequality shown by the shaded region in the graph with the boundary line 2x+2y=-6
what is 20/5*(3.8)=?
How would I solve this equation by rewriting it as a proportion?
Select the statement that describes the resulting image after the given transformations
B. 24D. 943. The function f(x) = 6,000(0.5)* models the amount of bacteria on a tablex seconds after being sprayed with cleaner. How much of the bacteria hasbee
A direct variation includes the points (3, 12) and (n, 8). Find n.