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

Whenever Jim enters a room where there are roses, his eyes water and he begins to sneeze. Jim must be allergic to roses. This is an example of A. proportion
What is the orthocenter of the triangle with two altitudes given by the lines x = -1 and y = x+1
Fill the blank with the preterite tense of the verb in parentheses. Yo _______________en el supermercado la semana pasada. (trabajar)
Please help, Thanks. :)
Which is the correct operation and solution to this problem? Judy is in charge of the largest tug-of-war event in her state. She has 288 meters of rope. She nee
What’s the solution for the system? Use the substitution Y-2x=8 16+4x=2y
The security cameras were mounted at the corners of a triangular parking lot. Camera 1 was 151 ft from camera 2, which was 122 ft from camera 3. Cameras 1 and 3
What was mercury powder used for in 1800?
Factor the expression 6x^4 - 162x
Posters are rarely text heavy and, in general, should rely on a single feature item to convey a message. True or False