From 64cf9114db73830f6e9e0e6eb7e9b60b35f00982 Mon Sep 17 00:00:00 2001 From: michaelgrasshopper Date: Wed, 20 May 2026 18:14:28 +0200 Subject: [PATCH] cfu-data-types-extra-lab-1 --- cfu-data-types.ipynb | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/cfu-data-types.ipynb b/cfu-data-types.ipynb index e0fee02..840caa9 100644 --- a/cfu-data-types.ipynb +++ b/cfu-data-types.ipynb @@ -53,7 +53,20 @@ "metadata": {}, "outputs": [], "source": [ - "# Your code here\n" + "# Your code here\n", + "name = str(input)\n", + "age = int(input)\n", + "address = (input)\n", + "salary = float(input)\n", + "expenses = float(input)\n", + "\n", + "calculations = salary - expenses\n", + "print(f\"After some calculations. You have left every month is {calculations}€.\")\n", + "if calculations >= 500:\n", + " print(\"True\")\n", + "\n", + "print(f\"{name}, {age}, {address}\")\n", + "print(f\"{salary}, {expenses}\")" ] }, { @@ -106,7 +119,15 @@ "metadata": {}, "outputs": [], "source": [ - "# Your code here\n" + "# Your code here\n", + "poem_lowercase = poem.lower()\n", + "print(poem_lowercase)\n", + "\n", + "no_punctuation = poem_lowercase.replace(\",\", \"\").replace(\".\", \"\").replace(\"'\", \"\")\n", + "print(no_punctuation)\n", + "\n", + "poem_list = no_punctuation.split()\n", + "print(poem_list)" ] } ],