diff --git a/notebooks/anmerkungenUndTipps.ipynb b/notebooks/anmerkungenUndTipps.ipynb index b3e32d7402e0dfa7b70775b633da40fa6625cc52..3979540d8a55fb89c3bf31afb2b75ee3b9acf1d1 100644 --- a/notebooks/anmerkungenUndTipps.ipynb +++ b/notebooks/anmerkungenUndTipps.ipynb @@ -193,7 +193,35 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "- Kommazahlen immer mit \".\" angeben -> 29.99 statt 29,99" + "- Gleitkommazahlen (floats) immer mit \".\" statt \",\" angeben -> 29.99 statt 29,99" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Gleitkommazahl durch Punkt getrennt -> RICHTIG\n", + "\n", + "preis=29.99\n", + "print(preis)\n", + "print(type(preis))\n", + "# python erkennt die Zahl und gibt die Zahl wieder. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Gleitkommazahl durch Komma getrennt -> FALSCH\n", + "\n", + "preis=29,99\n", + "print(preis)\n", + "type(preis)\n", + "# Python erkennt zwei Zahlen, die es in einem Tupel speichert." ] }, {