What is the error in this statement?


#1

if scoreA = scoreB :
print(“Tie”)


#2

Use == for comparison, = for assignments.


#3

Is there a difference between them?


#4

Definitely. An assignment can only be made with single equals, and comparison can only be made with double equals.


#5

Oh thanks :slight_smile:


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.