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 1+1? Is there a formula I need to use to figure this out?
what does several mean
what's the greatest -1 1/2 or 1/2
Frank finds 9 coins on the floor of his car, and 3 of them are quarters. If he finds 15 more coins on the ground, at the same ratio as the coins found in the ca
In a shop the total cost of two shirts and a trouser is Rs 3491.96 if the cost of a shirt is Rs 2006.99 less than the cost of trouser then what is the cost of a
Which of the following sets of numbers could repersent the three sides of a triangle? a: 15,27,42 b:15,18,33 c:8,20,25 d:12,23,35
the graph of f(x)=|x-h|+k contains the points (-6,-2) and (0,-2). the graph has a vertex at (h,-5). descrie how to find the value of h. then, explain how this v
Sarah was 50 1/4 inches tall when she was 12 years old. she was 48 1/2 inches tall when she was 11. how much did she grow during the year?
HELP PLEASE ASAP! Analyze the diagram below. Each segment of the umbrella appears to be a different color. Explain why each section appears to be the color that
What takes the most impact of any part of the body? O Feet O Wrists O Hamstrings O Knees