Please be informed that the '%d' is for decimal numbers in Python whereas the '%s' is for generic string or object and in the case of an object, it will get converted to a string type data.
Refer to the below code for reference:
name ='giacomo'
number = 4.3
print('%s %s %d %f %g' % (name, number, number, number, number))
The output:
giacomo 4.3 4 4.300000 4.3
As you can notice that the %d will truncate to integer, %s will maintain formatting, %f will print as float, and %g is used for generic number:
print('%d' % (name))
The above code will throw an exception as we cannot able to convert a string format data to number format data.