diff --git a/00_python_colab/03_operators_keywords_variables/Agentic_AI_Python_Lesson_03_Operators,_Keywords_&_Variables.ipynb b/00_python_colab/03_operators_keywords_variables/Agentic_AI_Python_Lesson_03_Operators,_Keywords_&_Variables.ipynb index 38293ea..67bd3da 100644 --- a/00_python_colab/03_operators_keywords_variables/Agentic_AI_Python_Lesson_03_Operators,_Keywords_&_Variables.ipynb +++ b/00_python_colab/03_operators_keywords_variables/Agentic_AI_Python_Lesson_03_Operators,_Keywords_&_Variables.ipynb @@ -536,21 +536,21 @@ { "cell_type": "markdown", "source": [ - "## **4. Assignment Operators**\n", - "Used to assign values to variables.\n", - "\n", - "
\n", - "\n", - "| Operator | Example | Equivalent To |\n", - "|----------|---------|---------------|\n", - "| = | x = 5 | x = 5 |\n", - "| += | x += 3 | x = x + 3 |\n", - "| -= | x -= 3 | x = x - 3 |\n", - "| *= | x *= 3 | x = x * 3 |\n", - "| /= | x /= 3 | x = x / 3 |\n", - "| //= | x //= 3 | x = x // 3 |\n", - "| | | |\n", - "| | | |\n" + ## **4. Assignment Operators** +Used to assign values to variables. + +
+ +| Operator | Example | Equivalent To | +|----------|---------|---------------| +| = | x = 5 | x = 5 | +| += | x += 3 | x = x + 3 | +| -= | x -= 3 | x = x - 3 | +| *= | x *= 3 | x = x * 3 | +| /= | x /= 3 | x = x / 3 | +| //= | x //= 3 | x = x // 3 | +| %= | x %= 3 | x = x % 3 | +| | | | ], "metadata": { "id": "rjEUF7mWpJ3U" @@ -575,7 +575,9 @@ "print(\"Division Assignment: x /= 3 \",x) # Output: 5.0\n", "\n", "x //= 3 # Equivalent to x = x // 3\n", - "print(\"Floor Division Assignment: x //= 3 \",x) # Output: 1.0" + "print(\"Floor Division Assignment: x //= 3 \",x) # Output: 1.0", + "x %= 3 # Equivalent to x = x % 3\n", + "print(\"Modulo Assignment: x %= 3 \",x) # Output: 1.0" ], "metadata": { "colab": { @@ -1133,4 +1135,4 @@ } } ] -} \ No newline at end of file +}