Answer:
def replace_punctuation(input_str,exclamationCount =0,semicolonCount=0):
result=''
for i in input_str:
if i=='!':
i='.'
exclamationCount+=1
elif i==';':
i=','
semicolonCount+=1
result+=i
print('Punctuation replaced')
#displaying replaced values counts
print('exclamationCount:',exclamationCount)
print('semicolonCount:',semicolonCount)
return result
Step-by-step explanation: