From 3ba7683a44a0b6ca3d5b2bda8397b9d93f4d08be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20=C5=9Awiderski?= Date: Tue, 19 Apr 2022 18:08:46 +0200 Subject: [PATCH] =?UTF-8?q?Prze=C5=9Blij=20pliki=20do=20''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Architektura_systemu.ipynb | 175 +++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 Architektura_systemu.ipynb diff --git a/Architektura_systemu.ipynb b/Architektura_systemu.ipynb new file mode 100644 index 0000000..62a2cd8 --- /dev/null +++ b/Architektura_systemu.ipynb @@ -0,0 +1,175 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 43, + "id": "christian-prototype", + "metadata": {}, + "outputs": [], + "source": [ + "tekst = \"Jak masz na imię?\"\n", + "potrzeba = \"\"\n", + "\n", + "StateUser = {\n", + " 'request': 1}\n", + "\n", + "StateSystem = {\n", + " 'inform': 1}\n", + "Act_user_state = 0" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "happy-constraint", + "metadata": {}, + "outputs": [], + "source": [ + "def AJN(tekst):\n", + " name = \"Jak masz na imię?\"\n", + " if name == tekst:\n", + " Act_user_state = StateUser['request']\n", + " return Act_user_state" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "modified-questionnaire", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n" + ] + } + ], + "source": [ + "state_ajn = AJN(tekst)\n", + "# print(stateUSER)\n", + "print(state_ajn)" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "sharing-congress", + "metadata": {}, + "outputs": [], + "source": [ + "def MSD(state_ajn):\n", + " if state_ajn == 1:\n", + " potrzeba = 'imię'\n", + " return potrzeba" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "silent-moisture", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "imię\n" + ] + } + ], + "source": [ + "potrzeba = MSD(state_ajn)\n", + "print(potrzeba)" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "unsigned-addition", + "metadata": {}, + "outputs": [], + "source": [ + "def TD(potrzeba):\n", + " potrzeba1 = 'imię'\n", + " if potrzeba == potrzeba1:\n", + " act_system_state = StateSystem['inform']\n", + " return act_system_state" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "id": "double-bouquet", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n" + ] + } + ], + "source": [ + "stateSYSTEM = TD(potrzeba)\n", + "print(stateSYSTEM)" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "id": "together-genetics", + "metadata": {}, + "outputs": [], + "source": [ + "def GJN(stateSYSTEM):\n", + " if stateSYSTEM == 1:\n", + " return 'Witaj, nazywam się Dijon i jestem systemem rezerwacji biletów kinowych'" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "id": "472e584d-b2db-45a0-bec5-27153a74581f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Witaj, nazywam się Dijon i jestem systemem rezerwacji biletów kinowych'" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "GJN(stateSYSTEM)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}