Write a function named apply_gst (prices_list) that takes a list of prices as a parameter and applies GST to every price
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a function named apply_gst (prices_list) that takes a list of prices as a parameter and applies GST to every price
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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!