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

An adjusting entry to record an accrued expense involves a debit to a(an):____. a. expense account and a credit to Cash. b. expense account and a credit to a p
6m + 17  is greater then or equal to 77 (HELP WILL GIVE BRAINLIST)
What is the DEPENDENT variable in this experiment? (Hint: What depends on the independent variable?)
What are the underage drinking laws, and what applies to them?
A laptop computer originally priced at $1,200 now sells for $1,600 what is the percent of increase
Pls helo me with this pls
I NEED HELP ASAP!! PLEASE SHOW ALL WORK!!
HELPThe expression (m^5) * (m^−5)^−3 is equivalent to m^n. What is the value of n? Enter your answer in the box. n =I am certain the answer is 20, please correc
a farmer has 100m for fence avaibiable, with which he intends to build a pen for his sheep. he intends to create a rectangular pen against a permanent stone wal
10 pts... pls help me do this, with instructions tysm