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

PLSSSS HELPP ASAP DUE RIGHT NOWW 30 POINTS Conjugate each verb below. YOU MAY TAKE THIS ONLY ONCE. yo / aprender Ustedes / aprender tú / bailar nosotros / ba
What is the surface area of prism below?
Triangle ABC is defined by the points A (3, 2), B (3, 4), and C (6, 3). Find the perimeter of the triangle. Round to two decimal places.
Work out the value of X.
How did Columbus react after he reached Hispaniola on his second voyage and found that his men had been killed by Indigenous people? He forced the Indigenous pe
2. Find each product in lowest terms. a) 3/4 x 1 7/9 b) 4 4/7 x 3 1/4 c) 1 7/8 x 2 1/4please help me I want it right now​
waht is a good title for mental health awarness title!!!!!!!!!!!!
You are being charged 16% interest on your unpaid balance of $785.00. What is your interest charge?
Which pair of angles must be supplementary? * 2 1 5 4 3 O <1 and <5 <5 and <3 <4 and <5 O <4 and <1
in a class of 48,30. are boys. what are the probability that a girl is picked randomly to represent the class in debate​