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

Can you help me to answer those questions please
Justin is walking around an area that has few trees and many tall grasses. In which biome is Justin most likely walking? A deciduous forest B grassland C desert
Which equations have no solution? a. 3x-y=2, 9x-3y=6 b. 4x-7y+28=0, 5y-7x+9=0 c. 3x-5y-11=0, 6x-10y-7=0 d. None of these
The state of Minnesota has an issue with the state of Wisconsin that goes to court. In this example, the Supreme Court has ___________ jurisdiction to hear this
What year was Christopher Columbus born in?​
which best-selling book, written by angela duckworth, explains how success can be achieved by a combination of passion and persistence?
The solubility of o2 in water is 6.5mg/l at an atmospheric pressure of 1.0 atm and temperature of 40.0 c. calculate henrys law constant of o2 at 40c. the molar
What year was Christopher Columbus born in?​
What year was Christopher Columbus born in?​
3) A large cheese pizza costs $11.99. A medium cheese pizza costs $8.99. How much do 2 large and 3 medium pizzas cost?