Equality test requires a double ==
, you used single =
:
if monkeya=="yes" and monkeyb=="yes":
print("unsafe - plotting")
elif monkeya=="no" and monkeyb=="no":
print("unsafe - angry")
A single =
equals sign is an assignment statement, which you cannot use inside of an expression (so not after if
).