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

Raj paid $5.04 for 6 cookies. Heath paid $4.00 for 5 cookies. Which of the following statements is true? Raj and Heath paid the same per cookie. Heath paid less
What is the solution to the system of equations below? x+y=7 and 3x-2y=11 a. (7 , 2) b. (2, 7) c. (4, 3) d. (3, 4)
Use the drop-down tool to select the correct answer. 700 BCE was an important time; the first was opened in Greece. was responsible for performing medical re
when did martin luther king die and whereHINT:not in a busif you respond the right question you get 24 points UWU24 or 25?meh 24
What 5 context clues imply that Mrs.Jones, despite her clear generosity, has her own financial struggles
Simplify the expression (-0.6x - 4) - (1.4x + 1.5).
Why was expansion for early Ottomans always to the West?
364 - 127 I AM IN 2ND NOT MIDDLE SCHOOL​
Does this mean Acceleration???
The force of attraction that a -40.0 μC point charge exerts on a +108 μC point charge has magnitude 4.00 N. How far apart are these two charges? (k = 1/4πε0 = 8