Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Enter and execute the following code. Use various values for the cost and the sale price. originalPrice = float (input (Enter the original cost of

Enter and execute the following code. Use various values for the cost and the sale price.

originalPrice = float (input ("Enter the original cost of the time: ")) salePrice = float (input ("Enter the sale price: ")) percentOff = int (( originalPrice salePrice )/ originalPrice 100) print ("Original Price: $" ,format( originalPrice , ".2f") , sep ="") print ("Sale Price: $" ,format( salePrice , ".2f") , sep ="") print ("Percent Off: " ,format( percentOff , "d") ,"%" , sep ="") if ( percentOff >= 50): print ("You got a great sale!")

Explain what line of the above program does.

(a) (1 point) Line 1

(b) (1point)Line3

(c) (1 point) Line 4

(d) (1point)Line6

(e) (1 point) Line 7 - 8

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 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions