Changed namespace to avoid potential naming conflicts (namespaces should be unique, and URLs that belong to you are ideal for this).
Wrapped the script in a function to enable strict mode throughout.
Added support for users with no completed courses, and adjusted the hours output to 2 decimal places.