193k views
9 votes
Print("Weight on Earth?")

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

any1 know anything wrong with this code? (python)

User Memedon
by
5.0k points

1 Answer

5 votes

Answer:

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

weightMoon = weightEarth/6

print("Weight on moon:", weightMoon)

Step-by-step explanation:

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

User Baztoune
by
4.8k points