Question: PYTHON is the language Write a program that will convert gold weight in grams (g) to troy ounces (ozT), based on the formula ozT =

PYTHON is the languagePYTHON is the language Write a program that will convert gold weight

Write a program that will convert gold weight in grams (g) to troy ounces (ozT), based on the formula ozT = g * 0.032. The program will do the following: 1. Ask a user to enter the weight of gold in grams. The user should be able to input a decimal. 2. Convert grams (g) to troy ounces (ozT). 3. Print the message xxx gram of gold equals xxx troy ounces. Round up the output to 2 decimal points. 4. If the result is greater than or equal to 3, print 'Accept'. 5. If the result is less than or equal to 1, print 'Reject'. 6. For all other values, print 'Correct'. 7. Ask a user if s/he wants to enter a number again. If the answer is 'Yes', add a loop and start the program from the beginning. If the answer is 'No' - break the loop and end the program. 8. Add try/except statements to catch errors if the user enters a non-numeric value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!