Answer:
def insSort(arr):
ct=0;
for i in range(1, len(arr)):
key = arr[i]
j = i-1
while j >=0 and key < arr[j] :
arr[j+1] = arr[j]
j -= 1
ct=ct+1;
arr[j+1] = key
return arr,ct;
print(insSort([2,1]))
Output of the program is also attached.
You should have the percentage of tip based on the service that you received.
Then you multiply the percentage of tip by the amount of money that you have to pay for what you bought.
Software problem.
Assuming "Software" is one of the available answers.
1. Imminent?
2. Copyright?