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

After Salome dances for Herod, he offers her one half of his ____, but instead of his kingdom she asks for the head of John the Baptist. A. travesty B. domain C
which feature of the United states constitution was included to address the concern expressed by James madison
The narrator of “Sonny’s Blues” is a round and dynamic character. How do we know this? He is one-dimensional and remains the same throughout the story. He is mu
Write a fraction that is less than 5/8 and has a denominator of 8
Who is the intended audience of the Abraham Lincoln’s The Gettysburg Address?
what is the direction of velocity of an object moving along a circular path??
What unique view of democracy did Franklin express? Select one: a. That all land owning males could vote b. That a republican form of government could replace m
help,.... Solve the volume formula V = lwh for h. a) [tex]h= \frac{V}{l}+w [/tex] b) [tex]h= \frac{lw}{V}[/tex] c) [tex]h= \frac{V}{lw}[/tex] d) [tex]h = Vlw[/
Jews were severely persecuted following the fall of this nation to the German army.
A marble factory ships marbles using bags of 10, cases of 100, cartons of 1,000, and boxes of 10,000. The factory has an order for 3,570 marbles. How can they