{ "cells": [ { "cell_type": "markdown", "id": "905d62f6", "metadata": {}, "source": [ "# Listes (list) vs Matrices (array)" ] }, { "cell_type": "markdown", "id": "a737e936", "metadata": {}, "source": [ "Existe-t-il une différence entre les listes (objets natifs de Python) et les matrices (objets ajoutés par la bibliothèque Numpy) ?" ] }, { "cell_type": "markdown", "id": "7bc0f4a5", "metadata": {}, "source": [ "## Listes" ] }, { "cell_type": "markdown", "id": "b8a13e36", "metadata": {}, "source": [ "> Que vaut *a* ?" ] }, { "cell_type": "code", "execution_count": null, "id": "551249b2", "metadata": {}, "outputs": [], "source": [ "b = [1, 2, 3]\n", "a = b + b" ] }, { "cell_type": "code", "execution_count": null, "id": "6ec0c5c7", "metadata": {}, "outputs": [], "source": [ "# TO DO" ] }, { "cell_type": "markdown", "id": "8c861131", "metadata": {}, "source": [ "## Matrices" ] }, { "cell_type": "markdown", "id": "a422f0dc", "metadata": {}, "source": [ "> Que vaut *va* ?" ] }, { "cell_type": "code", "execution_count": null, "id": "2ab94dbe", "metadata": {}, "outputs": [], "source": [ "vb = np.array( [1,2,3] )\n", "va = vb + vb" ] }, { "cell_type": "code", "execution_count": null, "id": "f054e586", "metadata": {}, "outputs": [], "source": [ "# TO DO" ] }, { "cell_type": "markdown", "id": "873bcbf4", "metadata": {}, "source": [ "## Conclusion ?" ] }, { "cell_type": "markdown", "id": "9abf6254", "metadata": {}, "source": [ "Réponse : " ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "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.9.16" } }, "nbformat": 4, "nbformat_minor": 5 }