Prześlij pliki do ''

This commit is contained in:
Adrian Świderski 2022-04-19 18:08:46 +02:00
parent fa336f7b14
commit 3ba7683a44
1 changed files with 175 additions and 0 deletions

175
Architektura_systemu.ipynb Normal file
View File

@ -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
}