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 unbalanced force of 25 N, E, is applied to a 12-kg mass. What is the acceleration given to the mass?
it is asking me to insert parentasies
Okay so I have three tests tomorrow. Haven't even started studying for two of them (Literature and History) but I already know science. How do you all learn 40
The areas of two circles are 36(pi) and 64(pi). What is hte ratio of the diameters? of the circumferences?
What is a sound wave?
A patient needs to receive 35 mg of amoxicillin orally. The drug is available in a strength of 100 mg/tsp, How many tsp of the drug must the patient swallow to
Prove identity tan 3x−tan 2x−tanx = tan 3xtan 2xtanx
What is the value of 9P5? A. 45 B. 126 C. 15,120 D . 59,049 A cooking club has 12 members.How many ways can they select a president and vice presiden
How many months is 0.75 of a year
What is the value of 9P5? A. 45 B. 126 C. 15,120 D . 59,049 A cooking club has 12 members.How many ways can they select a president and vice presiden