176 lines
3.4 KiB
Plaintext
176 lines
3.4 KiB
Plaintext
|
{
|
||
|
"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
|
||
|
}
|