From 4f052a259297c546f312ea1e4af912a6ee502d09 Mon Sep 17 00:00:00 2001 From: Joe <127773439+joegeorge022@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:22:34 +0530 Subject: [PATCH] Add files via upload --- Day-16/Indhu Subash.ipynb | 98 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 Day-16/Indhu Subash.ipynb diff --git a/Day-16/Indhu Subash.ipynb b/Day-16/Indhu Subash.ipynb new file mode 100644 index 0000000..cec8d76 --- /dev/null +++ b/Day-16/Indhu Subash.ipynb @@ -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 +}