Error in Python language

Asked

Viewed 73 times

1

  • 1

    Berdam, welcome to [en.so]! Please try not to use images external to the site, as well as post the code in the question itself. If you can, edit the question and put the code in it using the proper formatting. This will make it easier for the staff to help you. Hug!

2 answers

2

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

Second, on the else later, turn it into a elif or add a : (two points) and remove conditions.

Third, beware of the Eclipse validator, sometimes it may get confused or get "outdated" and show the error in the wrong place or else an error already fixed.

1

I am not a connoisseur of the Phyton language, but I am a programming enthusiast who loves to know new languages and new paradigms of language.... so I read on the web, the logical equality operator in Phyton is == and not = as in the error code line you showed.... tries to see if this is not it

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.