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

round 8.373 to the nearest hundredth
What effect do the forceful, rhythmic meter and repetition of phrases such as "half a league" and "cannon to the right" have in "The Charge of the Light Brigade
Please help me ASAP!!! What is − 9 over 20 as a decimal and as a percent? Decimal: Percent: %
May 30 was selected as Decoration Day first observed because it was NOT an anniversary of a battle. True or False?
Why did the Mexican government encourage American settlement in Mexico in the early 1820s
What is Bright and Asks a lot of questions?
Why might Myanmar have difficulty attracting foreign investments?
He wanted to make another quilt with an area of 42 square feet. What are its possible dimensions if they must be whole numbers? Which length and width makes the
how are the Cultures is in South America like the cultures in Mexico.
AP US History question: Analyze developments from 1941 to 1949 that increased suspicion and tension between the United States and the Soviet Union.