Question: Using Python COMPIT105s2Lab2 EXERCISE2 Samantha owns a small business, and she calculates the retail price of her products with the following formula: Retail price wholesale

Using Python
 Using Python COMPIT105s2Lab2 EXERCISE2 Samantha owns a small business, and she

COMPIT105s2Lab2 EXERCISE2 Samantha owns a small business, and she calculates the retail price of her products with the following formula: Retail price wholesale cost 2.5 She is using the following program to calculate retail prices: File Edit Format Run Options Window Help This pzogram calculates retail prices mark-up-2.5 # The markup percentage another " "y" # variable to control the loop # Process one or more items while anotherox another # Get the item's wholesale co5t wholesale float (input ("Enter the item's"+ wholesale cost: ")) # Calculate the retail p:ice retail-wholesale mark up # Display the retail price. print ( "Retail price : S" , format ( retail, . , . 2 ), sep ) # Do this again? another-input(Do you have another item? (Enter y for yes)' Some of the items have a wholesale cost such as S0.25 and sometimes she makes typing mistake; she types -0.25, instead of 0.25 (note 0 is close to-on KB) Your task is to modify the program so it will not allow a negative number to be entered for the wholesale cost. When she types-0.25 your improved program should print something like Enter the item's wholesale cost:-0.25 ERROR: the cost cannot be negative Enter the crrect wholesale cost :0.25 Retail price: 0.62 Do you have another item? (Enter y for yes): |

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!