diff --git a/IPython/frontend/qt/console/ipython_widget.py b/IPython/frontend/qt/console/ipython_widget.py
index dcf1237..46b6fd1 100644
--- a/IPython/frontend/qt/console/ipython_widget.py
+++ b/IPython/frontend/qt/console/ipython_widget.py
@@ -214,7 +214,7 @@ class IPythonWidget(FrontendWidget):
         self.log.debug("pyout: %s", msg.get('content', ''))
         if not self._hidden and self._is_from_this_session(msg):
             content = msg['content']
-            prompt_number = content.get('execution_count',0)
+            prompt_number = content.get('execution_count', 0)
             data = content['data']
             if data.has_key('text/html'):
                 self._append_plain_text(self.output_sep, True)
diff --git a/IPython/frontend/qt/console/rich_ipython_widget.py b/IPython/frontend/qt/console/rich_ipython_widget.py
index 1a83c47..6e75ae0 100644
--- a/IPython/frontend/qt/console/rich_ipython_widget.py
+++ b/IPython/frontend/qt/console/rich_ipython_widget.py
@@ -71,7 +71,7 @@ class RichIPythonWidget(IPythonWidget):
         """
         if not self._hidden and self._is_from_this_session(msg):
             content = msg['content']
-            prompt_number = content.get('execution_count',0)
+            prompt_number = content.get('execution_count', 0)
             data = content['data']
             if data.has_key('image/svg+xml'):
                 self.log.debug("pyout: %s", msg.get('content', ''))