Final style

This commit is contained in:
2025-01-07 11:26:57 +01:00
parent 01efeedbf8
commit c441593b0a
3 changed files with 127 additions and 194 deletions

View File

@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 9,
"metadata": {},
"outputs": [
{
@ -20,171 +20,51 @@
"WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.\n",
" * Running on http://127.0.0.1:5000\n",
"Press CTRL+C to quit\n",
"127.0.0.1 - - [07/Jan/2025 08:55:19] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:55:30] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:55:30] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:55:40] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:55:40] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:55:59] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:55:59] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:09] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:09] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:17] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:17] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:21] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:21] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:50] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:50] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:59] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:56:59] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:57:12] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:57:12] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:58:09] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:58:09] \"GET / HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:58:09] \"GET /result HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 08:58:21] \"GET /restart HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 08:58:21] \"GET / HTTP/1.1\" 200 -\n",
"[2025-01-07 08:58:26,826] ERROR in app: Exception on /result [GET]\n",
"Traceback (most recent call last):\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 1511, in wsgi_app\n",
" response = self.full_dispatch_request()\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 919, in full_dispatch_request\n",
" rv = self.handle_user_exception(e)\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 917, in full_dispatch_request\n",
" rv = self.dispatch_request()\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 902, in dispatch_request\n",
" return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]\n",
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^\n",
" File \"C:\\Users\\Gosztolya Máté\\AppData\\Local\\Temp\\ipykernel_5092\\533862744.py\", line 103, in result\n",
" correct_answers = selected_questions[i]['correct_answers']\n",
" ~~~~~~~~~~~~~~~~~~^^^\n",
"IndexError: list index out of range\n",
"127.0.0.1 - - [07/Jan/2025 08:58:26] \"GET /result HTTP/1.1\" 500 -\n",
"127.0.0.1 - - [07/Jan/2025 08:58:40] \"GET / HTTP/1.1\" 302 -\n",
"[2025-01-07 08:58:40,659] ERROR in app: Exception on /result [GET]\n",
"Traceback (most recent call last):\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 1511, in wsgi_app\n",
" response = self.full_dispatch_request()\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 919, in full_dispatch_request\n",
" rv = self.handle_user_exception(e)\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 917, in full_dispatch_request\n",
" rv = self.dispatch_request()\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 902, in dispatch_request\n",
" return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]\n",
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^\n",
" File \"C:\\Users\\Gosztolya Máté\\AppData\\Local\\Temp\\ipykernel_5092\\533862744.py\", line 103, in result\n",
" correct_answers = selected_questions[i]['correct_answers']\n",
" ~~~~~~~~~~~~~~~~~~^^^\n",
"IndexError: list index out of range\n",
"127.0.0.1 - - [07/Jan/2025 08:58:40] \"GET /result HTTP/1.1\" 500 -\n",
"127.0.0.1 - - [07/Jan/2025 08:59:29] \"GET / HTTP/1.1\" 302 -\n",
"[2025-01-07 08:59:29,804] ERROR in app: Exception on /result [GET]\n",
"Traceback (most recent call last):\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 1511, in wsgi_app\n",
" response = self.full_dispatch_request()\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 919, in full_dispatch_request\n",
" rv = self.handle_user_exception(e)\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 917, in full_dispatch_request\n",
" rv = self.dispatch_request()\n",
" File \"i:\\OwnCodes\\Python\\Portalfejlesztes-Teszt-PythonQuiz\\venv\\Lib\\site-packages\\flask\\app.py\", line 902, in dispatch_request\n",
" return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]\n",
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^\n",
" File \"C:\\Users\\Gosztolya Máté\\AppData\\Local\\Temp\\ipykernel_5092\\533862744.py\", line 103, in result\n",
" correct_answers = selected_questions[i]['correct_answers']\n",
" ~~~~~~~~~~~~~~~~~~^^^\n",
"IndexError: list index out of range\n",
"127.0.0.1 - - [07/Jan/2025 08:59:29] \"GET /result HTTP/1.1\" 500 -\n",
"127.0.0.1 - - [07/Jan/2025 09:00:17] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:09:44] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:09:44] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:10:05] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:10:05] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:10:10] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:10:10] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:10:39] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:10:39] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:10:45] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:10:45] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:14] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:14] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:19] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:19] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:26] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:26] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:38] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:38] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:47] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:47] \"GET / HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:11:47] \"GET /result HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:13:13] \"GET /restart HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:13:13] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:13:36] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:13:36] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:13:53] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:13:53] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:14:18] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:14:18] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:14:29] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:14:29] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:14:58] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:14:58] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:15:01] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:15:01] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:15:05] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:15:05] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:15:12] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:15:12] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:15:28] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:15:28] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:20:10] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:20:11] \"GET / HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:20:11] \"GET /result HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:20:39] \"GET /restart HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:20:39] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:24:12] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:24:12] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:24:33] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:24:33] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:24:56] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:24:57] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:01] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:01] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:40] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:40] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:43] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:43] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:48] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:48] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:52] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:25:52] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:26:47] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:26:47] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:26:58] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:26:58] \"GET / HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:26:58] \"GET /result HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:27:25] \"GET /restart HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:27:25] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:09] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:09] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:14] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:14] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:28] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:28] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:33] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:33] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:46] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:46] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:50] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:50] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:57] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:28:57] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:29:24] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:29:24] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:29:43] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:29:43] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 09:29:48] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:29:48] \"GET / HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 09:29:48] \"GET /result HTTP/1.1\" 200 -\n"
"127.0.0.1 - - [07/Jan/2025 11:04:58] \"GET /result HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:04:58] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:03] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:03] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:18] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:18] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:21] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:21] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:31] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:31] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:38] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:38] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:52] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:05:52] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:06:23] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:06:23] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:06:27] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:06:27] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:06:42] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:06:42] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:06:49] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:06:49] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:02] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:02] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:15] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:15] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:18] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:18] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:36] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:36] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:50] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:50] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:58] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:07:58] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:15] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:15] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:18] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:18] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:34] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:34] \"GET / HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:56] \"POST /submit_answer HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:56] \"GET / HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:08:56] \"GET /result HTTP/1.1\" 200 -\n",
"127.0.0.1 - - [07/Jan/2025 11:09:58] \"GET /restart HTTP/1.1\" 302 -\n",
"127.0.0.1 - - [07/Jan/2025 11:09:58] \"GET / HTTP/1.1\" 200 -\n"
]
}
],
@ -237,7 +117,7 @@
"def index():\n",
" # Initialize the quiz session\n",
" if 'selected_questions' not in session:\n",
" selected_questions = random.sample(questions, 10)\n",
" selected_questions = random.sample(questions, 20)\n",
" session['selected_questions'] = selected_questions\n",
" session['question_index'] = 0\n",
" session['answers'] = [] # Clear answers to start fresh\n",

View File

@ -3,63 +3,114 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quiz</title>
<title>Portalfejlesztes .Net ben Quiz</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f9;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(to right, #6a11cb, #2575fc);
color: #333;
padding: 20px;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
max-width: 600px;
margin: 0 auto;
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 30px;
border-radius: 15px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
transform: scale(1);
transition: transform 0.3s ease-in-out;
}
h1 {
text-align: center;
color: #2C3E50;
font-size: 2.2em;
margin-bottom: 20px;
}
.question {
margin-bottom: 20px;
font-size: 1.2em;
font-size: 1.3em;
font-weight: 600;
color: #34495e;
}
.answer-options {
margin-top: 10px;
margin-top: 15px;
}
.answer-options label {
display: block;
position: relative;
background: #ecf0f1;
padding: 10px 15px;
margin-bottom: 10px;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
}
.answer-options label:hover {
background: #3498db;
color: white;
transform: translateX(5px);
}
.answer-options input {
margin-right: 10px;
display: none;
}
.answer-options input:checked + label {
background: #2ecc71;
color: white;
border: 2px solid #27ae60;
}
.submit-button {
display: block;
width: 100%;
padding: 10px;
background-color: #3498db;
padding: 12px;
background-color: #e74c3c;
color: white;
border: none;
border-radius: 5px;
font-size: 1.1em;
border-radius: 8px;
font-size: 1.2em;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 1px;
transition: background-color 0.3s ease, transform 0.2s ease;
}
.submit-button:hover {
background-color: #2980b9;
background-color: #c0392b;
transform: scale(1.05);
}
.submit-button:active {
transform: scale(0.98);
}
</style>
</head>
<body>
<div class="container">
<h1>Question {{ question_index + 1 }}</h1>
<h1>Question {{ question_index + 1 }} / 20</h1>
<p class="question">{{ question['question'] }}</p>
<form method="POST" action="{{ url_for('submit_answer') }}">
{% for answer in question['answers'] %}
<label>
<input type="checkbox" name="answer" value="{{ answer }}">
{{ answer }}
</label><br>
{% endfor %}
<div class="answer-options">
{% for answer in question['answers'] %}
<input type="checkbox" id="answer_{{ loop.index }}" name="answer" value="{{ answer }}">
<label for="answer_{{ loop.index }}">
{{ answer }}
</label>
{% endfor %}
</div>
<input type="hidden" name="question_index" value="{{ question_index }}">
<input type="submit" value="Next" class="submit-button">
</form>

View File

@ -6,16 +6,15 @@
<title>Quiz Results</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f9;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(to right, #6a11cb, #2575fc);
color: #333;
padding: 20px;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: auto;
min-height: 100vh;
}
.container {
@ -28,6 +27,9 @@
overflow-y: auto;
max-height: 90vh;
}
.container::-webkit-scrollbar{
display: none;
}
h1 {
text-align: center;