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.
Just as a variant, you don't need the str(binaryNum) and the if statement
Instead you can do:
for num in binaryNum:
total += int(num)
considering a binmary number is only 0s and 1s if its a 0 it will add 0 so you can avoid the if statement