Answered step by step
Verified Expert Solution
Question
1 Approved Answer
An electronics retailer sets the price of the items it sells as follows - it takes the base price of an item, applies a markup
An electronics retailer sets the price of the items it sells as follows - it takes the base price of an item, applies a markup to this price, and then applies GST to the result to obtain the retail price. Write a program, which given the following three variables, calculates the retail price of an item for the retailer.
base_price = 25.99 markup = 35 gst = 15
You can assume the following:
- The variable base_price will always be assigned a floating point value.
- The variable markup will always be assigned an integer value. The value assigned is a percentage.
- The variable gst will always be assigned an integer value. The value assigned is a percentage.
Given the above statements, the program would produce the following output:
Given a base price of $25.99 and a markup of 35% The retail price of the item is $40.35
Please note the following:
- The calculated retail price should be rounded to the nearest 2 decimal places using the round() function.
- Do not include the above variable initialization statements in your code. They will be provided for you with each CodeRunner test case.
For example:
Test | Result |
---|---|
base_price = 25.99 markup = 35 gst = 15 | Given a base price of $25.99 and a markup of 35% The retail price of the item is $40.35 |
base_price = 550.0 markup = 50 gst = 15 | Given a base price of $550.0 and a markup of 50% The retail price of the item is $948.75 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started