Question
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
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