|
143 | 143 | "source": "Now, write an if statement that checks if 3 + 9 is greater than 7, and if so, print out something. Afterwards, print out another equation. Make sure to indent it correctly!", |
144 | 144 | "id": "d89d2f8bff2057b3" |
145 | 145 | }, |
| 146 | + { |
| 147 | + "metadata": {}, |
| 148 | + "cell_type": "code", |
| 149 | + "outputs": [], |
| 150 | + "execution_count": null, |
| 151 | + "source": "# write here", |
| 152 | + "id": "82ca1d1ad2afe1a7" |
| 153 | + }, |
| 154 | + { |
| 155 | + "metadata": {}, |
| 156 | + "cell_type": "markdown", |
| 157 | + "source": "Write another if statement that checks if 3 * 8 is greater than 2 + 16 and if it is, print out the two results.", |
| 158 | + "id": "c12322df0c213a1d" |
| 159 | + }, |
| 160 | + { |
| 161 | + "metadata": {}, |
| 162 | + "cell_type": "code", |
| 163 | + "outputs": [], |
| 164 | + "execution_count": null, |
| 165 | + "source": "# practice here", |
| 166 | + "id": "628ae4fa255db811" |
| 167 | + }, |
146 | 168 | { |
147 | 169 | "metadata": {}, |
148 | 170 | "cell_type": "markdown", |
|
167 | 189 | ], |
168 | 190 | "id": "2d86bb363be72685" |
169 | 191 | }, |
| 192 | + { |
| 193 | + "metadata": {}, |
| 194 | + "cell_type": "markdown", |
| 195 | + "source": "try calling this function below!", |
| 196 | + "id": "4e6e90af32d25617" |
| 197 | + }, |
| 198 | + { |
| 199 | + "metadata": {}, |
| 200 | + "cell_type": "code", |
| 201 | + "outputs": [], |
| 202 | + "execution_count": null, |
| 203 | + "source": [ |
| 204 | + "def multiply_fourfold(text):\n", |
| 205 | + " print(text + text + text + text)\n" |
| 206 | + ], |
| 207 | + "id": "2dd3422fe3853b3f" |
| 208 | + }, |
170 | 209 | { |
171 | 210 | "metadata": {}, |
172 | 211 | "cell_type": "markdown", |
|
180 | 219 | { |
181 | 220 | "metadata": { |
182 | 221 | "ExecuteTime": { |
183 | | - "end_time": "2025-08-12T15:10:22.174124Z", |
184 | | - "start_time": "2025-08-12T15:10:22.153190Z" |
| 222 | + "end_time": "2025-09-19T16:17:06.845303Z", |
| 223 | + "start_time": "2025-09-19T16:17:06.612175Z" |
185 | 224 | } |
186 | 225 | }, |
187 | 226 | "cell_type": "code", |
|
197 | 236 | "name": "stdout", |
198 | 237 | "output_type": "stream", |
199 | 238 | "text": [ |
200 | | - "5\n", |
201 | | - "I love 3.1415962\n" |
| 239 | + "5\n" |
| 240 | + ] |
| 241 | + }, |
| 242 | + { |
| 243 | + "ename": "TypeError", |
| 244 | + "evalue": "can only concatenate str (not \"float\") to str", |
| 245 | + "output_type": "error", |
| 246 | + "traceback": [ |
| 247 | + "\u001B[31m---------------------------------------------------------------------------\u001B[39m", |
| 248 | + "\u001B[31mTypeError\u001B[39m Traceback (most recent call last)", |
| 249 | + "\u001B[36mCell\u001B[39m\u001B[36m \u001B[39m\u001B[32mIn[1]\u001B[39m\u001B[32m, line 4\u001B[39m\n\u001B[32m 2\u001B[39m \u001B[38;5;28mprint\u001B[39m(x)\n\u001B[32m 3\u001B[39m pi = \u001B[32m3.1415962\u001B[39m\n\u001B[32m----> \u001B[39m\u001B[32m4\u001B[39m \u001B[38;5;28mprint\u001B[39m(\u001B[33;43m\"\u001B[39;49m\u001B[33;43mI love \u001B[39;49m\u001B[33;43m\"\u001B[39;49m\u001B[43m \u001B[49m\u001B[43m+\u001B[49m\u001B[43m \u001B[49m\u001B[43mpi\u001B[49m)\n", |
| 250 | + "\u001B[31mTypeError\u001B[39m: can only concatenate str (not \"float\") to str" |
202 | 251 | ] |
203 | 252 | } |
204 | 253 | ], |
205 | | - "execution_count": 2 |
| 254 | + "execution_count": 1 |
206 | 255 | }, |
207 | 256 | { |
208 | 257 | "metadata": {}, |
|
0 commit comments