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

Which of the following problems is most likely to exist in a society with an aging population? A. fewer government workers B. decreased taxes for younger worker
Targeting training needs is formally referred to as
The phrase baby boomers refers to americans who?
jaheed is making puch for a party. The recipe calls for 3.5 liters of fruit juice. Write a formula to help jaheed determine the number of cartons of juice he ne
What are the answers to the questions
What is the average velocity of the particle from rest to 9 seconds?
Which spreadsheet toolbar displays options such as Cut and Paste?
A sealed balloon is filled with 2.20 liters of helium gas at 20.0° c. if the pressure does not change, what is the temperature when the balloon expands to a vo
what factor can cause brakes to fade or fall?
What is the coefficient of y in the expression 1 ⋅ 2 + 6y? 1 2 6 8