{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "de5bd8f3",
   "metadata": {},
   "source": [
    "Syntax errors"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "94c4882e",
   "metadata": {},
   "outputs": [],
   "source": [
    "print('Hello, world!'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "16cac773",
   "metadata": {},
   "outputs": [],
   "source": [
    "x = input('Give a number:')\n",
    "if x < 0\n",
    "    print('x is negative')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aef9b696",
   "metadata": {},
   "outputs": [],
   "source": [
    "x = input('Give a number:')\n",
    "if x < 0: \n",
    "print('x is negative')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b3412035",
   "metadata": {},
   "source": [
    "Name error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "30adb7cb",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Check for errors\n",
    "message = 'How long is your commute? [in minutes]'\n",
    "commute = flaot(input(message))\n",
    "print(commute)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2538b028",
   "metadata": {},
   "source": [
    "Value error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d27bf69c",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(int(\"5\"))\n",
    "print(int(\"Dimitra\"))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e9842e25",
   "metadata": {},
   "source": [
    "Index error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8fb13c5c",
   "metadata": {},
   "outputs": [],
   "source": [
    "sequence = list(range(0,10))\n",
    "print(sequence)\n",
    "print(sequence[10])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0df74178",
   "metadata": {},
   "source": [
    "Type error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d35f2b5c",
   "metadata": {},
   "outputs": [],
   "source": [
    "\"5\"+5"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9a1361f4",
   "metadata": {},
   "source": [
    "Zero division"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "45c73420",
   "metadata": {},
   "outputs": [],
   "source": [
    "n = 10\n",
    "for i in range(n, -1, -1):\n",
    "    print(1/i)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "873d0de8",
   "metadata": {},
   "source": [
    "Logical errors"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e0c4b161",
   "metadata": {},
   "outputs": [],
   "source": [
    "pH = 5\n",
    "\n",
    "if pH < 7:\n",
    "    print(\"Basic solution\")\n",
    "elif pH == 7:\n",
    "    print(\"Neutral solution\")\n",
    "else:\n",
    "    print(\"Acidic solution\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "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.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
