Parsons Problem

Write a for loop to convert each price to a float and multiply it by 1.1 to find the total price with sales tax.

  1. In the space below, drag lines of code from the rows on the left to the empty rows on the right.
  2. Arrange the lines of code in the logical order that will produce the desired output.
  3. To indent a line of code, follow the yellow highlighting when positioning it over an empty row.
  4. To run your code, click the Run code button. The output of running your code, including any error messages, will appear in the panel at the bottom
  5. Click the Reset button to clear the code space on the right and start over.

Problem Setup

Assume that the following code has run already in this session.



book_prices = ['$55.99', '$119.95', '$13.95']

Compose your code here

price_num = float(price_num) * 1.1
price_num = price[1:]
for price in book_prices:
print(price_num)

Python output

>>Python output here...