diff --git a/Notebook1.ipynb b/Notebook1.ipynb index 9cfd576..1a1d14f 100644 --- a/Notebook1.ipynb +++ b/Notebook1.ipynb @@ -190,12 +190,24 @@ "id": "4c5c9023", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "print(\"Hello\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "443099f3", + "metadata": {}, + "outputs": [], + "source": [ + "git checkout -b '2nd_Year_CSE'\n" + ] } ], "metadata": { "kernelspec": { - "display_name": "myenv", + "display_name": "base", "language": "python", "name": "python3" }, @@ -209,7 +221,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.13.7" + "version": "3.13.9" } }, "nbformat": 4, diff --git a/Pyt_Abhay_3rdyr_10mar26.ipynb b/Pyt_Abhay_3rdyr_10mar26.ipynb new file mode 100644 index 0000000..e69de29 diff --git a/Pyt_Name_CSE_10Mar26.ipynb b/Pyt_Name_CSE_10Mar26.ipynb new file mode 100644 index 0000000..8e811c7 --- /dev/null +++ b/Pyt_Name_CSE_10Mar26.ipynb @@ -0,0 +1,96 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "349737d7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hello CSE People\n" + ] + } + ], + "source": [ + "print('Hello CSE People')" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "c53c099b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "315\n" + ] + } + ], + "source": [ + "x = 3+4*78\n", + "print(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "7a1a6503", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "str" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x = 4\n", + "name = 'Ronit'\n", + "#Convert the inteeger data to string\n", + "x_str = str(x)\n", + "data_type = type(x_str)\n", + "data_type" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "972c4d61", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/notebook2.ipynb b/notebook2.ipynb new file mode 100644 index 0000000..f2682ac --- /dev/null +++ b/notebook2.ipynb @@ -0,0 +1,247 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "34fe69ac", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Please choose an option: Greet, Info, Exit\n", + "This is a simple command-line program.\n", + "Please choose an option: Greet, Info, Exit\n", + "Hello! Nice to meet you.\n", + "Please choose an option: Greet, Info, Exit\n", + "Goodbye!\n", + "Please choose an option: Greet, Info, Exit\n", + "Goodbye!\n", + "Please choose an option: Greet, Info, Exit\n", + "Invalid choice. Please try again.\n", + "Please choose an option: Greet, Info, Exit\n", + "Invalid choice. Please try again.\n", + "Please choose an option: Greet, Info, Exit\n" + ] + } + ], + "source": [ + "choice = ''\n", + "while choice != 'Exit':\n", + " print(\"Please choose an option: Greet, Info, Exit\")\n", + " choice = input(\"Enter You Choice:\").lower()\n", + " if choice == 'greet':\n", + " print(\"Hello! Nice to meet you.\")\n", + " elif choice == 'info':\n", + " print(\"This is a simple command-line program.\")\n", + " elif choice == 'exit':\n", + " print(\"Goodbye!\")\n", + " else:\n", + " print(\"Invalid choice. Please try again.\")" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "52af0fe8", + "metadata": {}, + "outputs": [], + "source": [ + "#Write a Python program that uses the 'For' loop for \n", + "# iterating through a list of elements and \n", + "# prints all the elements present in that list." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "cad2ec55", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "No elements meets\n", + "Pencil\n", + "No elements meets\n" + ] + } + ], + "source": [ + "new_dict = {\"Item1\": \"Pen\", \"Item2\": \"Pencil\", \"Item3\": \"Eraser\"}\n", + "for i,j in new_dict.items():\n", + " if i ==\"Item2\":\n", + " print(j)\n", + " else:\n", + " print(\"No elements meets\")\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "634c5850", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n", + "2\n", + "3\n", + "4\n" + ] + } + ], + "source": [ + "list_A = [1,2,3,4,5,6,7,8]\n", + "search_item = 5\n", + "for i in list_A:\n", + " if i == search_item:\n", + " break\n", + " else:\n", + " print(i)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "e8fe689b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n", + "2\n", + "3\n", + "5\n", + "6\n", + "7\n", + "8\n" + ] + } + ], + "source": [ + "for i in list_A:\n", + " if i == search_item:\n", + " continue\n", + " else:\n", + " print(i)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "a8861a91", + "metadata": {}, + "outputs": [], + "source": [ + "#Use append function in the list\n", + "#Use the extend & insert fucntions in the list\n", + "#Observe the difference in the outputs afterwards" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "e68fd552", + "metadata": {}, + "outputs": [], + "source": [ + "#Populate a list with the squares of the numbers between 1-12." + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "6c4f9e2b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144]" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "list_of_squares = []\n", + "for i in range(1,13):\n", + " list_of_squares.append(i*i)\n", + "\n", + "list_of_squares" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "13c41cec", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144]" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "list_of_sq = [x*x for x in range(1,13)] #List Comprehension\n", + "list_of_sq" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "c7a64b35", + "metadata": {}, + "outputs": [], + "source": [ + "#Use the sort(), remove(), pop() functions in the list of squares \n", + "# that You have created." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fb06c887", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "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.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebook_for_12MAR26.ipynb b/notebook_for_12MAR26.ipynb new file mode 100644 index 0000000..8ca3eee --- /dev/null +++ b/notebook_for_12MAR26.ipynb @@ -0,0 +1,26 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "8f117cf5", + "metadata": {}, + "outputs": [], + "source": [ + "#You are a junior data analyst working for a small retail store. \n", + "# The store manager has provided the daily sales values for one week, \n", + "# but the values are stored as text (strings) \n", + "# instead of numbers. Your task is to write a Python program to process and analyze this data\n", + "\n", + "sales_data = [\"1200\", \"1500\", \"1100\", \"1800\", \"1600\", \"1400\", \"1700\"]" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/questions.pdf b/questions.pdf new file mode 100644 index 0000000..6d6d028 Binary files /dev/null and b/questions.pdf differ