|
114 | 114 | }, |
115 | 115 | { |
116 | 116 | "cell_type": "code", |
117 | | - "execution_count": 7, |
118 | | - "metadata": {}, |
119 | | - "outputs": [ |
120 | | - { |
121 | | - "name": "stdout", |
122 | | - "output_type": "stream", |
123 | | - "text": [ |
124 | | - "Percentage of men:\n", |
125 | | - "41.17647058823529\n" |
126 | | - ] |
127 | | - } |
128 | | - ], |
| 117 | + "execution_count": null, |
| 118 | + "metadata": {}, |
| 119 | + "outputs": [], |
129 | 120 | "source": [ |
130 | 121 | "males = 7\n", |
131 | 122 | "females = 10\n", |
|
150 | 141 | }, |
151 | 142 | { |
152 | 143 | "cell_type": "code", |
153 | | - "execution_count": 9, |
154 | | - "metadata": {}, |
155 | | - "outputs": [ |
156 | | - { |
157 | | - "name": "stdout", |
158 | | - "output_type": "stream", |
159 | | - "text": [ |
160 | | - "The cost of the meal will be:\n", |
161 | | - "96.65625\n" |
162 | | - ] |
163 | | - } |
164 | | - ], |
| 144 | + "execution_count": null, |
| 145 | + "metadata": {}, |
| 146 | + "outputs": [], |
165 | 147 | "source": [ |
166 | 148 | "food = 75\n", |
167 | 149 | "tax = 8.875/100\n", |
|
182 | 164 | }, |
183 | 165 | { |
184 | 166 | "cell_type": "code", |
185 | | - "execution_count": 10, |
| 167 | + "execution_count": null, |
186 | 168 | "metadata": {}, |
187 | 169 | "outputs": [], |
188 | 170 | "source": [ |
|
198 | 180 | }, |
199 | 181 | { |
200 | 182 | "cell_type": "code", |
201 | | - "execution_count": 11, |
202 | | - "metadata": {}, |
203 | | - "outputs": [ |
204 | | - { |
205 | | - "name": "stdout", |
206 | | - "output_type": "stream", |
207 | | - "text": [ |
208 | | - "The cost of the meal will be:\n", |
209 | | - "96.65625\n" |
210 | | - ] |
211 | | - } |
212 | | - ], |
| 183 | + "execution_count": null, |
| 184 | + "metadata": {}, |
| 185 | + "outputs": [], |
213 | 186 | "source": [ |
214 | 187 | "print(\"The cost of the meal will be:\")\n", |
215 | 188 | "print(cost)" |
|
226 | 199 | }, |
227 | 200 | { |
228 | 201 | "cell_type": "code", |
229 | | - "execution_count": 12, |
230 | | - "metadata": {}, |
231 | | - "outputs": [ |
232 | | - { |
233 | | - "name": "stdout", |
234 | | - "output_type": "stream", |
235 | | - "text": [ |
236 | | - "The cost of the meal will be:\n", |
237 | | - "128.875\n" |
238 | | - ] |
239 | | - } |
240 | | - ], |
| 202 | + "execution_count": null, |
| 203 | + "metadata": {}, |
| 204 | + "outputs": [], |
241 | 205 | "source": [ |
242 | 206 | "cost = food + food * tax + food * tip\n", |
243 | 207 | "print(\"The cost of the meal will be:\")\n", |
|
269 | 233 | }, |
270 | 234 | { |
271 | 235 | "cell_type": "code", |
272 | | - "execution_count": 1, |
| 236 | + "execution_count": null, |
273 | 237 | "metadata": {}, |
274 | 238 | "outputs": [], |
275 | 239 | "source": [ |
|
282 | 246 | }, |
283 | 247 | { |
284 | 248 | "cell_type": "code", |
285 | | - "execution_count": 2, |
286 | | - "metadata": {}, |
287 | | - "outputs": [ |
288 | | - { |
289 | | - "name": "stdout", |
290 | | - "output_type": "stream", |
291 | | - "text": [ |
292 | | - "The yearly value of this offer is 287500.0\n" |
293 | | - ] |
294 | | - } |
295 | | - ], |
| 249 | + "execution_count": null, |
| 250 | + "metadata": {}, |
| 251 | + "outputs": [], |
296 | 252 | "source": [ |
297 | 253 | "# Base scenario\n", |
298 | 254 | "yearly_value = base_salary + expected_bonus*base_salary + equity/years_vesting\n", |
|
308 | 264 | }, |
309 | 265 | { |
310 | 266 | "cell_type": "code", |
311 | | - "execution_count": 3, |
312 | | - "metadata": {}, |
313 | | - "outputs": [ |
314 | | - { |
315 | | - "name": "stdout", |
316 | | - "output_type": "stream", |
317 | | - "text": [ |
318 | | - "The yearly value of this offer is 287500.0\n" |
319 | | - ] |
320 | | - } |
321 | | - ], |
| 267 | + "execution_count": null, |
| 268 | + "metadata": {}, |
| 269 | + "outputs": [], |
322 | 270 | "source": [ |
323 | 271 | "# Same computation as above, but in three steps\n", |
324 | 272 | "# We start by adding the base_salary in the yearly_value\n", |
|
345 | 293 | }, |
346 | 294 | { |
347 | 295 | "cell_type": "code", |
348 | | - "execution_count": 13, |
349 | | - "metadata": {}, |
350 | | - "outputs": [ |
351 | | - { |
352 | | - "name": "stdout", |
353 | | - "output_type": "stream", |
354 | | - "text": [ |
355 | | - "The yearly value of this offer is 187500.0\n" |
356 | | - ] |
357 | | - } |
358 | | - ], |
| 296 | + "execution_count": null, |
| 297 | + "metadata": {}, |
| 298 | + "outputs": [], |
359 | 299 | "source": [ |
360 | 300 | "# Same computation as above, but using the += shorthand\n", |
361 | 301 | "yearly_value = base_salary \n", |
|
375 | 315 | }, |
376 | 316 | { |
377 | 317 | "cell_type": "code", |
378 | | - "execution_count": 6, |
379 | | - "metadata": {}, |
380 | | - "outputs": [ |
381 | | - { |
382 | | - "name": "stdout", |
383 | | - "output_type": "stream", |
384 | | - "text": [ |
385 | | - "The yearly value of this offer is 187500.0\n" |
386 | | - ] |
387 | | - } |
388 | | - ], |
| 318 | + "execution_count": null, |
| 319 | + "metadata": {}, |
| 320 | + "outputs": [], |
389 | 321 | "source": [ |
390 | 322 | "# Crash and burn scenario. Equity is worth nothing at the end\n", |
391 | 323 | "# your code here" |
392 | 324 | ] |
393 | 325 | }, |
394 | 326 | { |
395 | 327 | "cell_type": "code", |
396 | | - "execution_count": 5, |
397 | | - "metadata": {}, |
398 | | - "outputs": [ |
399 | | - { |
400 | | - "name": "stdout", |
401 | | - "output_type": "stream", |
402 | | - "text": [ |
403 | | - "The yearly value of this offer is 1187500.0\n" |
404 | | - ] |
405 | | - } |
406 | | - ], |
| 328 | + "execution_count": null, |
| 329 | + "metadata": {}, |
| 330 | + "outputs": [], |
407 | 331 | "source": [ |
408 | 332 | "# Optimistic scenario. The company goes up a lot, and equity is worth 10x more\n", |
409 | 333 | "# your code here" |
|
0 commit comments