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

What is 70,030,000 in scientific notation
-2m + 4m + 5 = -3 Tell me what you did please!
is 7 over 9 , 5 over 12, and 5 over 8 terminating or repeating decimals? and what are they in decimals? please explain..thx :)
A worker in a sunglass factory can make 50 frames or 100 lenses per day. There are 90 workers. How many workers should make lenses?
Two trains leave the station at the same time, one heading East and the other heading West. The westbound train is going 60mph. The eastbound train is going 80m
What's the value of 3 in 310.25
what is the complete subject in the following sentence? the young boy rode the bus to school.
What is 3,200,000,000,000 in scientific notation
what is 1 20/32 as a decimal and percent?
Calculate the number of moles 2.25 g of Na2CO3  0.800 g of NaOH  17.75 g of Na2SO4