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

6 numbers that have a median of 8 a mean of 9 and a range of 13?
Andrea has 3 tiles. One is a regular octagon, one is a regular pentagon and one is a regular hexagon. Andrea thinks the 3 tiles will fit together perfectly, as
Help please help! Need help
Consider the line 4x-8y= -6. What is the slope of a line perpendicular to this line? What is the slope of a line parallel to this line​
What is the units digit of the sum 1! + 2! + 3! + 4! + 5! + ... + 1000!? please help if you can
Egdar Allan poem “the bells” 2. Look up tintinnabulation in a dictionary and an etymology dictionary and explain its meaning and history. How does the word affe
What part connect to the tie rod that helps the brake chamber out that deals with slack adjuster
What important documents came out of each revolution? American Revolution – French Revolution –
(sleep) The child is in the bedroom.He____.​
John Mason , a 16 - year old , wants to find out what must be done in order to obtain his driver's licence . He called the licensing office many times but was