-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
098686c
commit bb11815
Showing
1 changed file
with
157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"nbgrader": { | ||
"grade": false, | ||
"locked": true, | ||
"solution": false | ||
} | ||
}, | ||
"source": [ | ||
"<figure>\n", | ||
" <IMG SRC=\"https://raw.githubusercontent.com/mbakker7/exploratory_computing_with_python/master/tudelft_logo.png\" WIDTH=250 ALIGN=\"right\">\n", | ||
"</figure>\n", | ||
"\n", | ||
"\n", | ||
"# Advanced strings and functions. Files and debugging Exercises." | ||
] | ||
}, | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"nbgrader": { | ||
"grade": false, | ||
"locked": true, | ||
"solution": false | ||
} | ||
}, | ||
"source": [ | ||
"## Exercise 3.1.1\n", | ||
"\n", | ||
"Use the <code>print()</code> function and an f-string to make a statement about some car using all variables stored in the <code>car_info</code> dictionary.\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": true, | ||
"nbgrader": { | ||
"grade": false, | ||
"locked": true, | ||
"solution": false | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# you do not have to change anything in this cell\n", | ||
"car_info = {\n", | ||
" 'top_speed' : '229', #km/h\n", | ||
" 'type' : 'Opel Astra'\n", | ||
"}\n", | ||
"\n", | ||
"#start your code here:\n", | ||
"#---------------------\n" | ||
] | ||
}, | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"nbgrader": { | ||
"grade": false, | ||
"locked": true, | ||
"solution": false | ||
} | ||
}, | ||
"source": [ | ||
"## Exercise 3.1.2\n", | ||
"\n", | ||
"Print the value of <b>π</b> using $4$ decimal places." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# write your code here\n", | ||
"rounded_pi = ...\n", | ||
"\n", | ||
"#start your code here:\n", | ||
"#---------------------\n", | ||
"\n" | ||
] | ||
}, | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"A dummy example" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"some_array = np.array([1,2,3,4,5,6,7,8,9,10]) \n", | ||
"print(some_array)\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3.7", | ||
"language": "python", | ||
"name": "python37" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.5" | ||
}, | ||
"latex_envs": { | ||
"LaTeX_envs_menu_present": true, | ||
"autoclose": false, | ||
"autocomplete": true, | ||
"bibliofile": "biblio.bib", | ||
"cite_by": "apalike", | ||
"current_citInitial": 1, | ||
"eqLabelWithNumbers": true, | ||
"eqNumInitial": 1, | ||
"hotkeys": { | ||
"equation": "Ctrl-E", | ||
"itemize": "Ctrl-I" | ||
}, | ||
"labels_anchors": false, | ||
"latex_user_defs": false, | ||
"report_style_numbering": false, | ||
"user_envs_cfg": false | ||
}, | ||
"vscode": { | ||
"interpreter": { | ||
"hash": "1fe2f2b718b1108b9c4176932db8a0ead471245140baaa21ea96a4066683e6b2" | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |