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

Please help just look at the pic
What is the rule of law
if f(1)=1 and f(n+1)=f(n)^2+4 then find the value of f(4)
Incomplete dominance is shown in the fruitloop flower, WW are white, RR are red and WR are pink. Use scratch paper to set up a Punnett square for a cross of the
2x-y=4 in y=mx+b form ?????
U.S. Environmental Protection Agency 1 Improving your home’s insulation and sealing air leaks are the fastest and most cost-effective ways to reduce energy wast
Why does Jo think the eagle feather is special? A. it was something she could not find in the city. B. she thought it was a good luck charm. C. it reminded her
Guys please help me! No one is helping me! In The Adventures of Tom Sawyer what character traits does Tom demonstrate when he is lost in the woods?
What is the measure of ∠BCE, in degrees, in the figure shown?
Which scenario portrays a round character?