Page 1 of 1

Write a function named apply_gst (prices_list) that takes a list of prices as a parameter and applies GST to every price

Posted: Thu May 05, 2022 8:27 pm
by answerhappygod
Write A Function Named Apply Gst Prices List That Takes A List Of Prices As A Parameter And Applies Gst To Every Price 1
Write A Function Named Apply Gst Prices List That Takes A List Of Prices As A Parameter And Applies Gst To Every Price 1 (22.2 KiB) Viewed 17 times
Write a function named apply_gst (prices_list) that takes a list of prices as a parameter and applies GST to every price in the parameter list. GST is currently 15%. The formula is: price*(1 + gst_rate/100). Round the result to 2 decimal places. Note: • The function makes changes in place. (i.e. it changes the list that is passed to the function. It does not create a new list and it does not return anything.) For example: Test Result prices = [25.5, 5, 9.5, 10,9, 15.3, 8.5] [29.32, 5.75, 10.92, 11.5, 10.35, 17.59, 9.77] apply_gst(prices) print (prices)