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

If a Works Cited entry begins with the title of an article, we can assume that A. no author was listed. B. the information taken from that source isn't reliab
Why is cactus hill really important?
Is choosing 5 players to represent the team at a fundraiser a permutation or a combination? please explain
With which of these positions would President Calvin Coolidge have agreed?
the mood of the poem "The Hollow Men" can best be described as a) dark and somber b.) moving and hopeful c.) violent and energetic
Michelle is thinking of a shape. It is not a polygon. It has two sides what is it?
for f(x)=x+3 and g(x)=4x+5 find the following functions(simplify answers) (f*g)(x)= (g*f)(x)= (f*g)(-1)=
Can being sick make your heart race?
(4x-2)*6(2x+7) in standard form
Which statement does not accurately describe a lasting result of the Crusades? A. Christians and Muslims blamed each other for the costly wars. B. Trade between