Skip to content
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
91 changes: 91 additions & 0 deletions MadhuraBorikar_CSE_11mar.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 12,
"id": "da9a4c01",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[78, 40, 92, 34, 67, 88, 53, 41, 76, 29]\n",
"[0, -5, 100, 40, 75]\n",
"[40, 34, 88, 41, 29, 81, 55, 90, 68, 84, -5, 40]\n",
"passed student : [78, 40, 92, 67, 88, 53, 41, 76, 64, 81, 55, 72, 90, 47, 68, 84, 100, 40, 75]\n",
"failed student : [34, 29, 39, 33, 0, -5]\n",
"Increased by 5 marks: [83, 45, 97, 39, 72, 93, 58, 46, 81, 34, 69, 86, 44, 60, 77, 95, 52, 73, 38, 89, 5, 0, 105, 45, 80]\n",
"Top Student greater than 75: [78, 92, 88, 76, 81, 90, 84, 100]\n"
]
}
],
"source": [
"scores = [78, 40, 92, 34, 67, 88, 53, 41, 76, 29, 64, 81, 39, 55, 72, 90, 47, 68, 33, 84, 0, -5, 100, 40, 75]\n",
"\n",
"score_passed = []\n",
"score_failed =[]\n",
"\n",
"\n",
" \n",
"print(scores[0:10])\n",
"\n",
"print(scores[-5:])\n",
"\n",
"print(scores[1::2])\n",
"\n",
"\n",
"# checking if passed or failed\n",
"for score in scores:\n",
" if score >= 40:\n",
" score_passed.append(score)\n",
" else:\n",
" score_failed.append(score)\n",
"\n",
"\n",
"# Incresed by 5\n",
"increased_by_5 = []\n",
"for score in scores:\n",
" score+=5\n",
" increased_by_5.append(score)\n",
"\n",
"\n",
"greater_than_75 =[]\n",
"# Greater than 75\n",
"for score in scores:\n",
" if score > 75:\n",
" greater_than_75.append(score)\n",
"\n",
"\n",
"\n",
"\n",
" \n",
"print(f\"passed student : {score_passed}\")\n",
"print(f\"failed student : {score_failed}\")\n",
"print(f\"Increased by 5 marks: {increased_by_5}\") \n",
"print(f\"Top Student greater than 75: {greater_than_75}\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "base",
"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.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading