Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Help 1? CSC108H5S Winter 2022, Assignment 1 Due: Mon Jan 31, 22:00, on Markus Q1: Discount An item is on sale for 85% of its
Help 1?
CSC108H5S Winter 2022, Assignment 1 Due: Mon Jan 31, 22:00, on Markus Q1: Discount An item is on sale for 85% of its original Price. Given the original price of the item, calculate its sale price. Filename Your filename for this question must be 91.py. Input The first line contains the nonnegative integer number of dollars in the original price of the item. For example, if the item cost is 2 dollars and 10 cents, then this line is 2. . The second line contains the integer number of cents (between o and 99) in the original price of the item. For example, if the item cost is 2 dollars and 10 cents, then this line is 10. Output Output the sale price of the item on one line in this format: the number of dollars, exactly one space, and the number of cents (between o and 99). Algorithm Here is the algorithm that you are required to use: . Calculate the total number of cents that the item originally costs. For example, an item that costs 2 dollars and 10 cents costs 210 cents. Multiply that total number of cents by 85, then add 50, then divide by 100. This is the total number of cents in the sale priceStep 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