I usually write new code/ solve bugs / do other code related tasks for almost 6-7 hrs a day .. Means 6*5 = 30 hrs (Office Hours).
Apart from Office work if you are working on some side projects, then you will easily end up coding from 7-8 hours daily on weekends .. or 1-2 hours roughly on weekdays.. 1 x 5 + 8 x 2 = 21 Hrs
So, roughly 51 productive hours a week.
I think it depends on person to person. You can easily code for at-least 6 productive hours daily.. which accounts to 30 hours, 5 days a week..