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

A culture of 1.75×1018 bacteria is in petri dish A. A culture of 6.25×1015 bacteria is in petri dish B. How many times greater is the number of bacteria in p
Can someone pls help me with 1-6
If the 5 hikers want to share the 14 peices of fruit evenly , how many peices should each person receive ?
Definition: this is the scale used to describe how acidic or basic a solution is. this affects the enzymes within living systems.
Alex's family raises fruit and vegetables for income. they live in an area that receives less than .2 inches of rain per month. therefore they need to use an ir
Train A leaves Westtown and travels at 50 mph toward Smithville, 330 miles away. At the same time, Train B leaves Smithville and travels at 60 mph toward Westto
Does anyone know algebra? If so plz help ASAP
Which of the following is the correct way to write seventy million as a numeral? 7000,0000 70,00,00,00 700,00000 70,000,000
How do u distribute 4(9-6)
The length of an object's shadow varies directly with It's heigt. If a can is 13 cm tall casts a shadow that is 7.5 cm long, a bottle that is 2.5 cm tall will c