Similar to what @Joseph pointed out in the comments, in the lines where you set a and b did you mean to use "f" instead of "feature"? Try the updates below:
for feature in selected_feature:
a = feature['parkeer_approx']
b = parking_capacity[feature.id()-int(1)]['parking_capacity']
feature["parkeer_approx"] = a - b
Tested with QGIS 3.6.1
As mentioned in the documentation, you can create a label and insert this code to get the current scale for the map with the item name Map 0:
map_get( item_variables('Map 0'), 'map_scale')
According to the QGIS Documentation for 2.18, for a Windows OS it is stored in your registry.
So, in your windows start menu, type regedit to open your registry. There, you can find it under: HKEY\CURRENT_USER\Software\QGIS\QGIS2
I run 2.18 as well and I can see it in my registry. Depending on your OS version, it can differ slightly (such as ...