In Python, a single '=' is for putting a value into a variable, like `my_score = 10`. But '==' is for checking if two things are the same, like in `if my_score == your_score:`. You use the double one inside your `if` statements to compare, not to assign. I learned this the hard way when my football team's attendance tracker program kept assigning kids to the 'absent' list instead of checking, ah! Thik se, it was a funny mess to fix.
#exams#study
Jump in to reply β no account needed.