Assignment Instructions/ Description
Use the locale module for the currency values 1. In IDLE, open the invoice_decimal.py file that’s in this folder: python/exercises/ch09 2. Modify this program so it displays the order total and invoice total as currency values in the United States. Add a shipping cost 3. Add a shipping cost as shown in the console data above. This charge should be .085 of the subtotal. As a result, it could cause a rounding error. To prevent this error from occurring, use the decimal module to make sure each monetary value has the correct number of decimal places. 4. Test and debug this program and make sure that it works with all input values.
Post a Comment