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

Fletcher has pre-school children. he might choose to work from home:
A few days ago my father, now a retired physician, told me of the time in the late 1960s when the perennial All-Star came to his office. Seeking treatment for t
most systems in the body use_____to maintain the body's internal environment
Which best describes President Lincoln’s reaction to the formation of the Confederate States of America?
Which of these countries is not a part of North America
The altitude of a plane is 1,600 ft. What must be the altitude of a submarine so that the sum of their altitudes is 0?
Government, matters of war and peace, and law enforcement are all part of the ______________ cultural universal
if a customer writes 26 checks per month, which bank will charge her the least in fees
Find the perimeter and area of each figure
a car dealership and I are told that a certain car is to sell for $12,080, which will include financing for 5 years . There will be a $500 down payment and the