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

What approach is required to balance the objectives of sustainable development? Balancing the objectives of sustainable development requires a(n) _________ appr
A direct result of european exploration of north america during the 1500s and early 1600s was the
Oriana touches a positively charged metal plate to a neutral metal sphere. How does the charge of the metal sphere change? It has a negative charge inside of th
What are the next two terms in the patter 3, 6, 5, 10, 9, 18, 17,...?
x/y + 9 = n Solve for y
The height of a rectangular prism is half its width The width of the prism is 1/3 of its length If the width of the prism is 3 centimeters, what is the volume?
Swift also proposed these five real solutions: taxing absentee landlords reducing the attitude of wastefulness reducing the desire in europe for luxuries at ire
Evaluate the absolute value of 60
Describe three methods by which the reproductive behavior of individuals can affect the growth rate of a population
Gabby walks Roblox beef from school and then 16 block South each block is 50 yards how far is Gabby from school in yards??​