Been round the houses on this for a few hours trying to figure out how to make this code execute, but its just making no sense to me anymore.
For some reason I receive the Invalid character in identifier error for the variable answer. I believe it has something to do with the fact that you can assign a value to a variable inside a conditional statement but you can't declare a new variable inside a conditional statement.
However despite trying to declare answer outside of the IF statement, declaring inside and generally trying my luck at altering bits and bobs here and there - I just cannot seem to work this out.
a = 2
b = 3
c = 10
if a == 2 * (b * c):
answer = 'a is double the sum of the others'
if b == 2 * (a + c):
answer = 'b is double the sum of the others'
if c == 2 * (a * b):
answer = 'c is double the sum of the others'
if a != 2 * (b + c) and b != 2 * (a + c) and c != 2 * (a + b):
answer = 'No number is double the sum of the others'
print(answer)
Picture of the error i'm receiving, it was also throwing this error for the first instance of 'answer' in the first IF statement.