Write a Python program that asks the user to enter his or her weight and the name
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a Python program that asks the user to enter his or her weight and the name of a planet. The program then outputs how much the user would weigh on that planet. The below table gives the factor by which the weight must be multiplied for each planet. The program should output an error message if the user doesn’t type the correct planet name. The prompt and the error message should make it clear to the user how a planet name must be entered.
PLANET | FACTOR |
Mercury | 0.4155 |
Venus | 0.8975 |
Earth | 1.000 |
Moon | 0.166 |
Mars | 0.3507 |
Jupiter | 2.5374 |
Saturn | 1.0677 |
Uranus | 0.8947 |
Neptune | 1.1794 |
Pluto | 0.0899 |
Requirements:
- Must implement Object-Oriented design
- Must implement a GUI
- Must implement Exception Handling
- The output must be rounded to 2 decimal digits
- Each calculated weight must be saved in a text file
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: