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 is an equation of a circle with center (5, 0) that passes through the point (1, 1)? HELP ME PLEASE!! Answer Choices: A.) (x - 1)2 + (y - 1)2 = 17B.) (x +
Syah work as senior designer in creative design company. he is an imaginative person and always updates himself with the latest technology and software. and he
Explain the major benefits of the evolution of sexual reproduction.
What are the three structural components of a nucleotide? A. A carboxyl, a sugar, and a phosphate B. A phosphate, an amino acid, and a carboxyl C. An amino acid
Joseph's taxi charges $10.00 for the initial service of any drive. Then, the fee for each mile is $0.75. Which type of function is represented by this situation
I want a fairy tale, history or an autobiography written in Spanish and containing the present tense, past tense, past tense and future tense..I just need a sma
why we do not feel the heat and light of countless twinkliing stars?
why we do not feel the heat and light of countless twinkliing stars?
how old are you?. im taking a survey... thanks
were do daisy come from