Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Assignment Operator

From Groundhog Learning
Revision as of 17:26, 23 October 2025 by Groundhog (talk | contribs) (Updated via bot)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Symbol = used to store a value in a variable.

Details

🤖 Pseudocode

score = 100 # stores the value 100 in the variable score

The assignment operator takes the value on the right side and stores it in the variable on the left. This process is always right to left — the value must be evaluated first before being assigned to the variable.

🤖 Pseudocode

score = 100   // correct
100 = score   // invalid

Assigning a value is also called setting a variable or performing a set operation.

Related Actions