Skip to content

Commit 15cb2a4

Browse files
committed
Modified
1 parent c81ab5a commit 15cb2a4

File tree

2 files changed

+133
-3
lines changed

2 files changed

+133
-3
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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+
}

variables.ipynb

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,34 @@
5353
},
5454
{
5555
"cell_type": "code",
56-
"execution_count": null,
56+
"execution_count": 1,
5757
"id": "0782ab22-ecf9-4d8f-ae63-07c6aacac382",
5858
"metadata": {},
59-
"outputs": [],
60-
"source": []
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+
]
6184
}
6285
],
6386
"metadata": {

0 commit comments

Comments
 (0)