On 7/31/2019 3:16 PM, Terry Reedy wrote:
On 7/30/2019 10:24 PM, Sara Mistral wrote:

I downloaded Python recently on my computer and I have some troubles making it work. It doesn’t allow me to make and if function and elif without the good indentation. I have the latest version of Python (3.7.4) and my mac is updated (macOS Mojave 10.14.5).
As you can see in the picture,

Most python mail lists do not allow binary attachments.  idledev currently does, but attachments do not follow responses.  It is also impossible to copy from images to determine what you entered.  Please copy and paste instead of attaching screenshots.

 >>> if a > 0:
     print('positive')
if a < 0:

SyntaxError: invalid syntax

To show that the error has nothing to do with the the somewhat wacky indents in IDLE's shell, here is the same code in interactive python (no IDLE) in Windows.

C:\Users\Terry>python
Python 3.7.4 <snip>

>>> if a:
...    b
... if c:
  File "<stdin>", line 3
    if c:
    ^
SyntaxError: invalid syntax
>>>

--
Terry Jan Reedy


_______________________________________________
IDLE-dev mailing list
IDLE-dev@python.org
https://mail.python.org/mailman/listinfo/idle-dev

Reply via email to