Skip to content

Commit 68c2b07

Browse files
committed
Updates in formatting
1 parent c77039b commit 68c2b07

21 files changed

+1053
-365
lines changed

.ipynb_checkpoints/Condition_Statements-checkpoint.ipynb

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@
4040
"Executes the statements inside the block only if the condition is satisfied.\n",
4141
"\n",
4242
"Syntax: \n",
43-
">*if* condition: \n",
44-
"     Statements"
43+
"```python\n",
44+
"if condition: \n",
45+
" Statements\n",
46+
"```"
4547
]
4648
},
4749
{
@@ -74,14 +76,14 @@
7476
},
7577
{
7678
"cell_type": "code",
77-
"execution_count": 5,
79+
"execution_count": 2,
7880
"metadata": {},
7981
"outputs": [
8082
{
8183
"name": "stdin",
8284
"output_type": "stream",
8385
"text": [
84-
" -1\n"
86+
" -2\n"
8587
]
8688
},
8789
{
@@ -108,10 +110,12 @@
108110
"#### 2. *if - else* statements:\n",
109111
"Executes *else* when *if* condition fails \n",
110112
"Syntax: \n",
111-
">if condition1: \n",
112-
"    Statements \n",
113+
"```python\n",
114+
"if condition1: \n",
115+
" Statements \n",
113116
"else: \n",
114-
"    Statements"
117+
" Statements\n",
118+
"```"
115119
]
116120
},
117121
{
@@ -121,12 +125,14 @@
121125
"#### 3. *if - elif - else* statements:\n",
122126
"Checks for truth of *elif* statement when *if* statement fails. Chain of *if-else* \n",
123127
"Syntax: \n",
124-
">if condition1: \n",
125-
"    Statements\n",
128+
"```python\n",
129+
"if condition1: \n",
130+
" Statements \n",
126131
"elif condition2: \n",
127-
"    Statements\n",
132+
" Statements \n",
128133
"else: \n",
129-
"    Statements"
134+
" Statements\n",
135+
"```"
130136
]
131137
},
132138
{
@@ -137,16 +143,18 @@
137143
"*if else* within another *if else* statement\n",
138144
"\n",
139145
"Syntax:\n",
140-
">if condition1: \n",
141-
"      if condition2: \n",
142-
"         Statements \n",
143-
"      else: \n",
144-
"         Statements \n",
146+
"```python\n",
147+
"if condition1: \n",
148+
" if condition2: \n",
149+
" Statements \n",
150+
" else: \n",
151+
" Statements \n",
145152
"else: \n",
146-
"      if condition3: \n",
147-
"         Statements \n",
148-
"      else: \n",
149-
"         Statements "
153+
" if condition3: \n",
154+
" Statements \n",
155+
" else: \n",
156+
" Statements \n",
157+
"```"
150158
]
151159
},
152160
{
@@ -157,7 +165,9 @@
157165
"One liner of *if else* statements\n",
158166
"\n",
159167
"Syntax:\n",
160-
"> Statement1 if condition else Statement2"
168+
"```python\n",
169+
"Statement1 if condition else Statement2\n",
170+
"```"
161171
]
162172
}
163173
],
@@ -177,7 +187,7 @@
177187
"name": "python",
178188
"nbconvert_exporter": "python",
179189
"pygments_lexer": "ipython3",
180-
"version": "3.8.6"
190+
"version": "3.9.4"
181191
}
182192
},
183193
"nbformat": 4,

0 commit comments

Comments
 (0)