<prompt> Lengo ni kubuni kazi ya mahesabu ya jumla baada ya discounting bei na kiwango cha kodi iliyotolewa.Kwa kuwa ni kamba s na integer k, reverse kwanza k herufi kwa kila 2k herufi kuhesabu kutoka mwanzo wa kamba. Kama kuna chini ya k herufi kushoto, reverse wote. Kama kuna chini ya 2k lakini kubwa au sawa na k herufi, basi reverse kwanza k herufi na kuacha nyingine kama awali.  <response>: To implement the given string problem in Python, you can use slicing and string concatenation. Here is the code:def reverse_strings, k: result i 0 while i lens: reverse first k characters if i k lens: result si:ik::-1 i k reverse remaining characters else: result si:::-1 break leave next k characters as original if i k lens: result si:ik i k include remaining characters as is else: result si: break return resultTo calculate the total amount after discounting the price with the given tax rate, you can use the following formula:total_amount price - price tax_rate 100Here, price is the original price and tax_rate is the percentage of tax to be applied. 