Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull #4

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,300 changes: 1,300 additions & 0 deletions Lab.2.ipynb

Large diffs are not rendered by default.

1,154 changes: 1,037 additions & 117 deletions Labs/Lab.2/Lab.2.ipynb

Large diffs are not rendered by default.

573 changes: 357 additions & 216 deletions Labs/Lab.3/Lab.3.ipynb

Large diffs are not rendered by default.

1,048 changes: 1,014 additions & 34 deletions Labs/Lab.4/Lab.4.ipynb

Large diffs are not rendered by default.

690 changes: 676 additions & 14 deletions Labs/Lab.5/Lab.5.ipynb

Large diffs are not rendered by default.

Binary file added Labs/Lab.6/Blank diagram.pdf
Binary file not shown.
1,190 changes: 1,170 additions & 20 deletions Labs/Lab.6/Lab.6.ipynb

Large diffs are not rendered by default.

4,282 changes: 3,832 additions & 450 deletions Labs/Lab.7/Lab.7.ipynb

Large diffs are not rendered by default.

904 changes: 861 additions & 43 deletions Labs/Lab.8/Lab.8.ipynb

Large diffs are not rendered by default.

792 changes: 663 additions & 129 deletions Labs/Lab.9/Lab.9.ipynb

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions quiz.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 15,
"id": "e6c643de-76e0-4721-9b60-f91255f04df2",
"metadata": {},
"outputs": [],
"source": [
"def create_new_args0(args):\n",
" max_len=max(map(len, filter(lambda x:isinstance(x, list), args)))\n",
" new_args=[]\n",
" for a in args:\n",
" if not isinstance (a, list):\n",
" a0=[a] *max_len\n",
" elif len(a)==max_len:\n",
" a0=a\n",
" else:\n",
" print(\"Error: all list arguments must have the same length.\")\n",
" return\n",
" new_args.append(a0)\n",
" return new_args\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "1f9fd1ac-3b93-4452-88b8-2cc757c3fbb0",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[[1, 2], [3, 4], [5, 5]]"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"create_new_args0([[1,2],[3,4],5])"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "4ec0e39c-4bbb-4e31-810e-42fc6f62ce73",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[[4, 7], [7, 8], [10, 10]]"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"create_new_args0([[4,7],[7,8],10])"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "bb42d54b-4ab6-4713-9be2-2ca23fbaaed1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Error: all list arguments must have the same length.\n"
]
}
],
"source": [
"create_new_args0([[4,7,8],[7,8],10])"
]
}
],
"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.12.1"
}
},
"nbformat": 4,
"nbformat_minor": 5
}