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

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.


PLANETFACTOR
Mercury0.4155
Venus0.8975
Earth1.000
Moon0.166
Mars0.3507
Jupiter2.5374
Saturn1.0677
Uranus0.8947
Neptune1.1794
Pluto0.0899

Requirements:

  1. Must implement Object-Oriented design
  2. Must implement a GUI
  3. Must implement Exception Handling
  4. The output must be rounded to 2 decimal digits
  5. Each calculated weight must be saved in a text file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Creating a Python program with a graphical user interface GUI and handling exceptions can be quite an involved process Below Ill provide a simplified ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!