Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions cfu-data-types.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,32 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"medilin, who is 29 years old, and lives in Paris has -1800.0 dollars left from her salary after expenses. It is False that she has more than $500 left.\n"
]
}
],
"source": [
"# Your code here\n"
"# Your code here\n",
"name = input(\"enter your name\")\n",
"age = int(input(\"enter your age\"))\n",
"address = input(\"enter your adress\")\n",
"expenses = float(input(\"enter your expenses\"))\n",
"salary = float(input(\"enter your salary\"))\n",
"\n",
"remaining = round(salary - expenses, 1)\n",
"\n",
"is_salary_good = (remaining >= 500)\n",
"\n",
"print(f\"{name}, who is {age} years old, and lives in {address} has {remaining} dollars left from her salary after expenses. It is {is_salary_good} that she has more than $500 left.\")\n",
"\n",
"\n"
]
},
{
Expand Down Expand Up @@ -112,7 +133,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -126,7 +147,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.13.5"
}
},
"nbformat": 4,
Expand Down