PracticeForExam

This commit is contained in:
2024-12-05 23:20:53 +01:00
parent bcff76d934
commit a1e0e21582
5 changed files with 240 additions and 34 deletions

View File

@ -24,15 +24,30 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[6, 5, 3, 4, 6, 5, 8, 3, 6, 5]]\n"
]
}
],
"source": [
"lines = []\n",
"with open(\"matrix.txt\") as file:\n",
" lines.append([list(map(int,i.strip().split())) for i in file.readlines()])\n",
"\n",
"\n",
"print([list(map(sum,i)) for i in lines])"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
@ -46,7 +61,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
"version": "3.12.3"
}
},
"nbformat": 4,