-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30188d6
commit 4f052a2
Showing
1 changed file
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"metadata": {}, | ||
"cell_type": "markdown", | ||
"source": [ | ||
"# This is a sample Jupyter Notebook\n", | ||
"\n", | ||
"Below is an example of a code cell. \n", | ||
"Put your cursor into the cell and press Shift+Enter to execute it and select the next one, or click 'Run Cell' button.\n", | ||
"\n", | ||
"Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.\n", | ||
"\n", | ||
"To learn more about Jupyter Notebooks in PyCharm, see [help](https://www.jetbrains.com/help/pycharm/ipython-notebook-support.html).\n", | ||
"For an overview of PyCharm, go to Help -> Learn IDE features or refer to [our documentation](https://www.jetbrains.com/help/pycharm/getting-started.html)." | ||
], | ||
"id": "8a77807f92f26ee" | ||
}, | ||
{ | ||
"metadata": { | ||
"ExecuteTime": { | ||
"end_time": "2024-12-20T12:21:53.769586Z", | ||
"start_time": "2024-12-20T12:21:53.744373Z" | ||
} | ||
}, | ||
"cell_type": "code", | ||
"source": [ | ||
"\"\"\"\n", | ||
"AUTHOR : INDHU SUBASH\n", | ||
"DATE : 20-12-2024\n", | ||
"\"\"\"\n", | ||
"student_ids = [102, 101, 105, 102, 101, 103, 104, 105]\n", | ||
"unique_sorted_ids = sorted(set(student_ids))\n", | ||
"unique_sorted_ids=set(unique_sorted_ids)\n", | ||
"print(\"Unique and Sorted Student IDs:\", unique_sorted_ids)\n", | ||
"\n", | ||
"grades = (100,98,95,87,93)\n", | ||
"average_grade = sum(grades) / len(grades)\n", | ||
"print(f\"Grades : {grades}\")\n", | ||
"print(\"Average Grade:\", average_grade)\n", | ||
"\n", | ||
"python_students = {\"Appu\", \"Abhijith\", \"Unni\", \"Abhishek\"}\n", | ||
"machine_learning_students = {\"Unni\", \"Eve\", \"Abhishek\", \"Alice\"}\n", | ||
"\n", | ||
"common_students = python_students & machine_learning_students\n", | ||
"print(\"Students attending both workshops:\", common_students)\n", | ||
"\n", | ||
"student_grades = {\n", | ||
" \"Appu\": (85, 90, 78),\n", | ||
" \"Abhijith\": (88, 76, 92),\n", | ||
" \"Unni\": (80, 85, 88),\n", | ||
"}\n", | ||
"\n", | ||
"for student, grades in student_grades.items():\n", | ||
" average = sum(grades) / len(grades)\n", | ||
" print(f\"{student}'s Average Grade: {average:.2f}\")\n" | ||
], | ||
"id": "fbc121e30a2defb3", | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Unique and Sorted Student IDs: {101, 102, 103, 104, 105}\n", | ||
"Grades : (100, 98, 95, 87, 93)\n", | ||
"Average Grade: 94.6\n", | ||
"Students attending both workshops: {'Abhishek', 'Unni'}\n", | ||
"Appu's Average Grade: 84.33\n", | ||
"Abhijith's Average Grade: 85.33\n", | ||
"Unni's Average Grade: 84.33\n" | ||
] | ||
} | ||
], | ||
"execution_count": 1 | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |