If weight on Earth is 100, then the weight on another planet will be proportional to it, based on the ratio of their mass (and the gravity that arises). Weight varies with gravity, while mass remains constant.
Not really. The computer doesn’t actually know anything. Our program might know because it’s been told, but the computer? Nata.
The gravity on Earth is a direct result of its mass. Given we’re on the same planet, our mass and weight have a one to one relationship so it’s fair to say that if one weighs 50kg, their mass is also 50kg. Technically, that is, Earth mass at rest.
When we go to another planet, our mass does not change. Only our weight changes, owing to the effect of gravity on that planet. If the planet has more mass than Earth, we will weigh more. If less, then we will weigh less.
The proportion is all based upon the relative masses of the two planets. That will tell us whether to expect more G-force, or less, and will be the determining factor in our weight.
Gravity is the same everywhere in space, as far as we can tell. In localized space, this is especially so. There are no anomalies. That’s what makes these ratios so reliable.
As for variables. they are just names. View them as pointers to data objects. It’s the objects that have value, not the variables. Values cannot be variables. That’s why the interpreter will burp when we try to write something like this,
180 = 180 * planetary_mass_ratio
We broke two rules here, one already mentioned, the other that variables can never start with a number.
jupiter_weight = earth_weight * ratio_of_jupiter_m_to_earth_m