|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "code", |
| 5 | + "execution_count": null, |
| 6 | + "id": "5486e58d-c1fd-4965-a24e-02050a0e8587", |
| 7 | + "metadata": {}, |
| 8 | + "outputs": [], |
| 9 | + "source": [ |
| 10 | + "mv_population = 74728\n", |
| 11 | + "# mv_population ---> variable name\n", |
| 12 | + "# = ---> assignment operator\n", |
| 13 | + "# 74728 ---> variable" |
| 14 | + ] |
| 15 | + }, |
| 16 | + { |
| 17 | + "cell_type": "code", |
| 18 | + "execution_count": null, |
| 19 | + "id": "5ca960a0-13ab-4cb9-a733-27a2aada254e", |
| 20 | + "metadata": {}, |
| 21 | + "outputs": [], |
| 22 | + "source": [ |
| 23 | + "x,y,z = 2,4,6\n", |
| 24 | + "# we can also assign like this" |
| 25 | + ] |
| 26 | + }, |
| 27 | + { |
| 28 | + "cell_type": "code", |
| 29 | + "execution_count": 3, |
| 30 | + "id": "ab0384f5-b600-41a7-b1bd-f64716a60f9b", |
| 31 | + "metadata": {}, |
| 32 | + "outputs": [ |
| 33 | + { |
| 34 | + "name": "stdout", |
| 35 | + "output_type": "stream", |
| 36 | + "text": [ |
| 37 | + "81528\n" |
| 38 | + ] |
| 39 | + } |
| 40 | + ], |
| 41 | + "source": [ |
| 42 | + "# variable manipulation\n", |
| 43 | + "mv_population = 74728\n", |
| 44 | + "mv_population = mv_population + 4000 - 600\n", |
| 45 | + "\n", |
| 46 | + "# -------------OR----------------\n", |
| 47 | + "\n", |
| 48 | + "mv_population += 4000 - 600\n", |
| 49 | + "# += ---> increment assignment operator\n", |
| 50 | + "\n", |
| 51 | + "print (mv_population)" |
| 52 | + ] |
| 53 | + }, |
| 54 | + { |
| 55 | + "cell_type": "code", |
| 56 | + "execution_count": 1, |
| 57 | + "id": "0782ab22-ecf9-4d8f-ae63-07c6aacac382", |
| 58 | + "metadata": {}, |
| 59 | + "outputs": [ |
| 60 | + { |
| 61 | + "name": "stdout", |
| 62 | + "output_type": "stream", |
| 63 | + "text": [ |
| 64 | + "Selected Jupyter core packages...\n", |
| 65 | + "IPython : 8.25.0\n", |
| 66 | + "ipykernel : 6.28.0\n", |
| 67 | + "ipywidgets : 8.1.2\n", |
| 68 | + "jupyter_client : 8.6.0\n", |
| 69 | + "jupyter_core : 5.5.0\n", |
| 70 | + "jupyter_server : 2.10.0\n", |
| 71 | + "jupyterlab : 4.2.3\n", |
| 72 | + "nbclient : 0.8.0\n", |
| 73 | + "nbconvert : 7.10.0\n", |
| 74 | + "nbformat : 5.9.2\n", |
| 75 | + "notebook : 7.2.1\n", |
| 76 | + "qtconsole : 5.5.1\n", |
| 77 | + "traitlets : 5.14.3\n" |
| 78 | + ] |
| 79 | + } |
| 80 | + ], |
| 81 | + "source": [ |
| 82 | + "!jupyter --version" |
| 83 | + ] |
| 84 | + } |
| 85 | + ], |
| 86 | + "metadata": { |
| 87 | + "kernelspec": { |
| 88 | + "display_name": "example", |
| 89 | + "language": "python", |
| 90 | + "name": "example" |
| 91 | + }, |
| 92 | + "language_info": { |
| 93 | + "codemirror_mode": { |
| 94 | + "name": "ipython", |
| 95 | + "version": 3 |
| 96 | + }, |
| 97 | + "file_extension": ".py", |
| 98 | + "mimetype": "text/x-python", |
| 99 | + "name": "python", |
| 100 | + "nbconvert_exporter": "python", |
| 101 | + "pygments_lexer": "ipython3", |
| 102 | + "version": "3.12.2" |
| 103 | + } |
| 104 | + }, |
| 105 | + "nbformat": 4, |
| 106 | + "nbformat_minor": 5 |
| 107 | +} |
0 commit comments