More actions
Updated via bot |
m Updated via bot |
||
| Line 1: | Line 1: | ||
<span id="assignment_operatorassignment-operator"></span> | <span id="assignment_operatorassignment-operator"></span> | ||
Symbol used to | Symbol <code>=</code> used to store a value in a [[Variable|variable]]. | ||
<span id="details"></span> | <span id="details"></span> | ||
| Line 8: | Line 8: | ||
<sub>🤖 ''Pseudocode''</sub> | <sub>🤖 ''Pseudocode''</sub> | ||
<syntaxhighlight lang="console">score = 100 # | <syntaxhighlight lang="console">score = 100 # stores the value 100 in the variable score</syntaxhighlight> | ||
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. | |||
<sub>🤖 ''Pseudocode''</sub> | |||
<syntaxhighlight lang="console">score = 100 // correct | |||
100 = score // invalid</syntaxhighlight> | |||
Assigning a value is also called ''setting a variable'' or performing a ''set operation''. | |||
<span id="related-actions"></span> | <span id="related-actions"></span> | ||
== Related Actions == | == Related Actions == | ||
* ''Used in'': [[Assign_a_Value_to_a_Variable|Assign a Value to a Variable]] | * ''Used in'': [[Assign_a_Value_to_a_Variable|Assign a Value to a Variable]] | ||
Latest revision as of 17:26, 23 October 2025
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
- Used in: Assign a Value to a Variable