Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 2

Thonny Python

Solved! Go to Solution.

I tried to make a calculator in Thonny and it said there was a SyntaxError in the initial if statement: "if b='^':".

1 Reply
Solution
Commander Lvl 2
Message 2 of 2

Re: Thonny Python

You'll want to review the syntax for python comparison operators.

 

A single equals sign is assignment. To compare, you must use two equal signs. E.g.:

if b=='^':

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!