|
Mrs. Ruiz-Houston
|
|
|
Computer Competition Level 3 Question #3.0 3.1 What could be more down-to-earth than a person’s age and weight? Yet both are controlled by astronomical forces. The pull between Earth and a human body leads us to declare that a person weighs some amount. How heavy would
you be if you lived on Venus? You can use
Prompt the user for their mass (in kg) and the planet that they are interested in. Output their weight (in N) on the planet that they specified, rounded to the tenths place. Format: Input: Your mass (in kg) = ? Choose a planet = ? 1 = Mercury 2 = Venus 3 = Earth 4 = Mars 5 = Jupiter 6 = Saturn 7 = Uranus 8 = 9 = Pluto Output: Your weight on planet is ? Example: Your mass (in kg) = 70 Choose a planet = 2 1 = Mercury 2 = Venus 3 = Earth 4 = Mars 5 = Jupiter 6 = Saturn 7 = Uranus 8 = 9 = Pluto Your weight on Earth is 620.0 N RUN / OUTPUT: Your mass (in kg) = 70 Choose a planet = 9 1 = Mercury 2 = Venus 3 = Earth 4 = Mars 5 = Jupiter 6 = Saturn 7 = Uranus 8 = 9 = Pluto Your weight on Pluto is 40.9 N Your mass (in kg) = 50 Choose a planet = 3 1 = Mercury 2 = Venus 3 = Earth 4 = Mars 5 = Jupiter 6 = Saturn 7 = Uranus 8 = 9 = Pluto Your weight on Earth is 489.9 N Your mass (in kg) = 70 Choose a planet = 1 1 = Mercury 2 = Venus 3 = Earth 4 = Mars 5 = Jupiter 6 = Saturn 7 = Uranus 8 = 9 = Pluto Your weight on Mercury is 259.1 N RE-TRY: Your mass (in kg) = 70 Choose a planet = 1 1 = Mercury 2 = Venus 3 = Earth 4 = Mars 5 = Jupiter 6 = Saturn 7 = Uranus 8 = 9 = Pluto Your weight on Mercury is 259.1 N Your mass (in kg) = 50 Choose a planet = 5 1 = Mercury 2 = Venus 3 = Earth 4 = Mars 5 = Jupiter 6 = Saturn 7 = Uranus 8 = 9 = Pluto Your weight on Jupiter is 1239.3 N Your mass (in kg) = 70 Choose a planet = 7 1 = Mercury 2 = Venus 3 = Earth 4 = Mars 5 = Jupiter 6 = Saturn 7 = Uranus 8 = 9 = Pluto Your weight on Uranus is 620.8 N |