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

Helppp pls :))))))))
Read the following sentence: I am more likely to buy things if I am feeling happy. Which sentence has a similar meaning? The chances are high that I will buy so
rewrite 6/7 using twenty firsts
if you are dealt 4 cards from a shuffled deck of 52 cards, find the probability of getting one Queen and three king​
2 Complete the following paragraphs with suitable verbs. Use either the past simple or past continuous tense. (6) A John Blake was born in London in 1969. He we
What's the difference between sound waves and pressure waves?
If f(x) = x2 - 4x + 3, and the domain is (-2,0, 1}, what is the range?
Which one is not a noun? health recipe exercising nutritionist
Jordie is getting balloons for his aunt's birthday party. He wants each balloon string to be 12 feet long. At the party store, string is sold by the yard. If Jo
It is planned and rehearsed speech.​