You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @TT70 thank you for the feedback! Seems like you are trying to run line by line the code you posted, most probably via the F9 shortcut or the Run selection or current line button, right? If that is the case I would say this is related with #4431
This is something we will try to tackle in s future Spyder release but for the moment some suggestions for you to run snippets of code could be to use code cell definitions. For more info on that you can check the related Spyder docs page: https://docs.spyder-ide.org/current/faq.html#using-code-cells
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
I would like to run a simple commands:
total = 0
for num in (-22.0, 3.5, 8.1, -10, 0.5):
if num > 0:
total = total + num
What steps reproduce the problem?
What is the expected output? What do you see instead?
for num in (-22.0, 3.5, 8.1, -10, 0.5):
Cell In[3], line 1
for num in (-22.0, 3.5, 8.1, -10, 0.5):
^
SyntaxError: incomplete input
if num > 0:
Cell In[4], line 1
if num > 0:
^
SyntaxError: incomplete input
total = total + num
Traceback (most recent call last):
Cell In[5], line 1
total = total + num
NameError: name 'num' is not defined
Paste Traceback/Error Below (if applicable)
Versions
Dependencies
The text was updated successfully, but these errors were encountered: