19vitkauskasd 19vitkauskasd
  • 17-01-2022
  • Computers and Technology
contestada

print("Weight on Earth?")
weightEarth = input()
weightMoon = (weightEarth/6)
print("Weight on moon:", weightMoon)

any1 know anything wrong with this code? (python)

Respuesta :

tonb
tonb tonb
  • 17-01-2022

Answer:

weightEarth = float(input("Enter weight on earth: "))

weightMoon = weightEarth/6

print("Weight on moon:", weightMoon)

Explanation:

You have to convert the string input into a float in order to do calculations with it.

Answer Link

Otras preguntas

In order for a hotel to successfully price discriminate so that wedding guests are given a? discount, the hotel must be able to
During photosynthesis, the energy from sunlight is used to split water molecules. What happens to the hydrogen ions that are split from the water molecules?
What is the best way to study for finals?
if 12 key chains cost $9, then 20 key chains cost $_______
You have used the formulas V = Bh and V = lwh to find the volume V of a rectangular prism with whole number edge lengths. Do you think the formulas work for rec
In 1940, Mussolini ended Italy’s neutrality by declaring war on
A box contains 3 red crayons, 6 pink crayons, 7 blue crayons, and 2 purple crayons. A crayon is chosen randomly and not replaced. Then a second crayon is chosen
One essential characteristic of a typical utopian society is
a company must consider all of the following when purchasing items for resale except
what are the steps to get the product of(7x-6)^2