Using Python and this online interpreter, write a program that will calculate the total cost of purchasing thumb drives. An 8-gigabyte (GB) thumb drive costs $6.99, and a 32-GB thumb drive costs $12.99 if purchased in quantities of 1–5. Note: You must use different cost values than the examples provided. If you purchase 6–20, there is a 10% discount. If you purchase 21–50, there is a 15% discount. If you purchase 51–100, there is a 20% discount. There is a 25% discount for any quantity over 100. Each of the discounts will be determined by Boolean logic. An example of the necessary interaction is as follows: Enter total number of 8-GB thumb drives to purchase: 10 Enter total number of 32-GB thumb drives to purchase: 76 Total cost: $852.70 When completed, take a screenshot of your Python source code along with the example output using appropriate inputs to the running application.
Using Python and this online interpreter, write a program that will calculate the total cost of purchasing thumb drives.
An 8-gigabyte (GB) thumb drive costs $6.99, and a 32-GB thumb drive costs $12.99 if purchased in quantities of 1–5. Note: You must use different cost values than the examples provided.
If you purchase 6–20, there is a 10% discount. If you purchase 21–50, there is a 15% discount. If you purchase 51–100, there is a 20% discount. There is a 25% discount for any quantity over 100. Each of the discounts will be determined by Boolean logic.
An example of the necessary interaction is as follows:
- Enter total number of 8-GB thumb drives to purchase: 10
- Enter total number of 32-GB thumb drives to purchase: 76
- Total cost: $852.70
When completed, take a screenshot of your Python source code along with the example output using appropriate inputs to the running application.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images