Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 price

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

A reference variable holds the ________ of an object.

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago