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

Delia earns $10.50 per hour working at a restaurant. On Friday she spent 1 3/4 hours cleaning . 2 1/3 hours doing paperwork, and 1 5/12 hours serving customers.
Suppose a new car that costs $25,000 depreciates by 12% each year. In about how many years will the car be worth $15,000? Use the equation 15,000 = (25,000)(0.8
Write a sentence in Spanish describing a doctor using the verb ser and two adjectives.
Adonde vas para comprar libros? voy a la ____
A consumer report organized into two columns could _____ two items. a.just compare b.compare and contrast c.just contrast
What is a moment of catharsis? What is an example of one?
True or False Certain antibiotics have become ineffective against certain strains of bacteria.These bacteria have developed a resistance, which may be passed on
What is 11/12 plus 5/9 in a proper fraction
What word or phrase is modified by the prepositional phrase in the sentence below? Michael joined a winter soccer league so he could play in between his school
Please help! Show work to please!! 1/5*5^8+9^10÷2 I need the Exaxt form, and Mixed Number Form.