I have a question about the numbers in the table of conversion in the next exercise: https://www.codecademy.com/paths/data-science/tracks/dscp-python-fundamentals/modules/dscp-python-control-flow/lessons/python-control-flow/exercises/review
I notice that the numbers for the relative gravity of the planets in the table of conversion are different from the numbers for relative gravity in the ‘hint’ section. I for example wrote down 0.91 for the relative gravity of venus, whilst in the hint section it says 0.78.
For reference, this is my solution to the exercise:
if planet == 1:
weight = weight*0.91
elif planet == 2:
weight = weight*0.38
elif planet == 3:
weight = weight*2.34
elif planet == 4:
weight = weight*1.06
elif planet == 5:
weight = weight*0.92
elif planet == 6:
weight = weight*1.19
print("Your weight:" + str(weight))
and in the hint section it says this:
if planet == 1:
weight = weight * 0.78
elif planet == 2:
weight = weight * 0.39
elif planet == 3:
weight = weight * 2.65
elif planet == 4:
weight = weight * 1.17
elif planet == 5:
weight = weight * 1.05
elif planet == 6:
weight = weight * 1.23
print("Your weight:", weight)
I’m not sure if i’m missing some if i’m missing something here? Thanks in advance for your help!!
PS: I also have another tiny question relating to this exercise:
Why is it necessary to say:
weight = weight * 1.23
instead of just:
weight * 1.23
Thank you very much for your patience