Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You need to add a digit only when it's needed, like from 9 to 10 or 99 to 100. In the cases you mentioned, there is no need to add one, only keep the same amount of digits. Not a kata issue.
You expect 'foobar00' to be incremented to 'foobar01', then you expect 'foobar099' to be incremented to 'foobar100'. 'foobaar001' should be incremented to 'foobar002'. Retain '0's in some and lose them in some other cases. Do not randomly design Katas just because you've to. Let there be some logic.
PS: I used Python3
I think the expression: (a + c) * b, was not taken into consideration while designing this Kata. Removing it from your array of possible expressions should fix it if you're using the same approach as mine.