Python language error

1

I'm new to Python, giving this error in the image.

link

What can I do to resolve?

    
asked by anonymous 27.08.2014 / 16:09

2 answers

2

First, use == to compare variables and not = , which is assignment.

Second, on else later, make it a elif or add a : (colon) and remove the conditions.

Third, be careful with the Eclipse validator, sometimes it can get confused or "outdated" and show the error in the wrong place or an already fixed bug.

    
27.08.2014 / 16:26
1

I'm not a connoisseur of the phyton language, but I'm a programming enthusiast who loves to know new languages and new language paradigms .... from what I read on the web, the logical equality operator in phyton is == and not = as in the line of error code you showed .... try to see if that is not it

The logical operator = would be "assignment" as in other programming languages

    
27.08.2014 / 16:23