update
This commit is contained in:
parent
2992f4f408
commit
4f46de8d00
3330 changed files with 394553 additions and 76939 deletions
27
.config/Code/User/History/-2da531bb/0oxV.ipynb
Normal file
27
.config/Code/User/History/-2da531bb/0oxV.ipynb
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = []"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
138
.config/Code/User/History/-2da531bb/1l4O.ipynb
Normal file
138
.config/Code/User/History/-2da531bb/1l4O.ipynb
Normal file
|
@ -0,0 +1,138 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
147
.config/Code/User/History/-2da531bb/2Pa4.ipynb
Normal file
147
.config/Code/User/History/-2da531bb/2Pa4.ipynb
Normal file
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
131
.config/Code/User/History/-2da531bb/3Mzb.ipynb
Normal file
131
.config/Code/User/History/-2da531bb/3Mzb.ipynb
Normal file
|
@ -0,0 +1,131 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"minimum is \n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
" print(minNum)\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
27
.config/Code/User/History/-2da531bb/6iaD.ipynb
Normal file
27
.config/Code/User/History/-2da531bb/6iaD.ipynb
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
93
.config/Code/User/History/-2da531bb/6vhU.ipynb
Normal file
93
.config/Code/User/History/-2da531bb/6vhU.ipynb
Normal file
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"print(dict['test'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"num1 = input('Enter first number: ')\n",
|
||||
"num2 = input('Enter second number: ')\n",
|
||||
"num3 = input('Enter third number: ')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
90
.config/Code/User/History/-2da531bb/83MV.ipynb
Normal file
90
.config/Code/User/History/-2da531bb/83MV.ipynb
Normal file
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"print(dict['test'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"num1 = input('Enter first number: ')\n",
|
||||
"num2 = input('Enter second number: ')\n",
|
||||
"num3 = input('Enter third number: ')\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
29
.config/Code/User/History/-2da531bb/8N0O.ipynb
Normal file
29
.config/Code/User/History/-2da531bb/8N0O.ipynb
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"vscode": {
|
||||
"languageId": "plaintext"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
147
.config/Code/User/History/-2da531bb/BVn0.ipynb
Normal file
147
.config/Code/User/History/-2da531bb/BVn0.ipynb
Normal file
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key does not exist\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
147
.config/Code/User/History/-2da531bb/CMT8.ipynb
Normal file
147
.config/Code/User/History/-2da531bb/CMT8.ipynb
Normal file
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
132
.config/Code/User/History/-2da531bb/ERSG.ipynb
Normal file
132
.config/Code/User/History/-2da531bb/ERSG.ipynb
Normal file
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"2\n",
|
||||
"1\n",
|
||||
"minimum is 1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
" print(minNum)\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
126
.config/Code/User/History/-2da531bb/GeFl.ipynb
Normal file
126
.config/Code/User/History/-2da531bb/GeFl.ipynb
Normal file
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"list = []\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
28
.config/Code/User/History/-2da531bb/HDZl.ipynb
Normal file
28
.config/Code/User/History/-2da531bb/HDZl.ipynb
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"print(dict['test'])"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
121
.config/Code/User/History/-2da531bb/KLiG.ipynb
Normal file
121
.config/Code/User/History/-2da531bb/KLiG.ipynb
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key does not exist\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"num1 = input('Enter first number: ')\n",
|
||||
"num2 = input('Enter second number: ')\n",
|
||||
"num3 = input('Enter third number: ')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
147
.config/Code/User/History/-2da531bb/QlKj.ipynb
Normal file
147
.config/Code/User/History/-2da531bb/QlKj.ipynb
Normal file
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
140
.config/Code/User/History/-2da531bb/URw3.ipynb
Normal file
140
.config/Code/User/History/-2da531bb/URw3.ipynb
Normal file
|
@ -0,0 +1,140 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
134
.config/Code/User/History/-2da531bb/UXwg.ipynb
Normal file
134
.config/Code/User/History/-2da531bb/UXwg.ipynb
Normal file
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"listlen = input('enter length of list')"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
57
.config/Code/User/History/-2da531bb/UfLf.ipynb
Normal file
57
.config/Code/User/History/-2da531bb/UfLf.ipynb
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"print(dict['test'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else :\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
121
.config/Code/User/History/-2da531bb/Vskn.ipynb
Normal file
121
.config/Code/User/History/-2da531bb/Vskn.ipynb
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"num1 = input('Enter first number: ')\n",
|
||||
"num2 = input('Enter second number: ')\n",
|
||||
"num3 = input('Enter third number: ')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
28
.config/Code/User/History/-2da531bb/W73K.ipynb
Normal file
28
.config/Code/User/History/-2da531bb/W73K.ipynb
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"dict['Rafay']"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
147
.config/Code/User/History/-2da531bb/XNHM.ipynb
Normal file
147
.config/Code/User/History/-2da531bb/XNHM.ipynb
Normal file
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
147
.config/Code/User/History/-2da531bb/YllB.ipynb
Normal file
147
.config/Code/User/History/-2da531bb/YllB.ipynb
Normal file
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
132
.config/Code/User/History/-2da531bb/Z9eZ.ipynb
Normal file
132
.config/Code/User/History/-2da531bb/Z9eZ.ipynb
Normal file
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
129
.config/Code/User/History/-2da531bb/c4Qt.ipynb
Normal file
129
.config/Code/User/History/-2da531bb/c4Qt.ipynb
Normal file
|
@ -0,0 +1,129 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print(minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
128
.config/Code/User/History/-2da531bb/cPYF.ipynb
Normal file
128
.config/Code/User/History/-2da531bb/cPYF.ipynb
Normal file
|
@ -0,0 +1,128 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
154
.config/Code/User/History/-2da531bb/eRzj.ipynb
Normal file
154
.config/Code/User/History/-2da531bb/eRzj.ipynb
Normal file
|
@ -0,0 +1,154 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
1
.config/Code/User/History/-2da531bb/entries.json
Normal file
1
.config/Code/User/History/-2da531bb/entries.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/Coding/Python/IDS/lab1/23i2526-RafayAhmad-lab1.ipynb","entries":[{"id":"8N0O.ipynb","timestamp":1724214451308},{"id":"j8Ds.ipynb","timestamp":1724214566793},{"id":"0oxV.ipynb","timestamp":1724214580689},{"id":"6iaD.ipynb","timestamp":1724214708154},{"id":"W73K.ipynb","timestamp":1724214744807},{"id":"HDZl.ipynb","timestamp":1724214796229},{"id":"UfLf.ipynb","timestamp":1724215651918},{"id":"wyKA.ipynb","timestamp":1724215751713},{"id":"83MV.ipynb","timestamp":1724215773549},{"id":"6vhU.ipynb","timestamp":1724215955706},{"id":"hcRb.ipynb","timestamp":1724216085087},{"id":"KLiG.ipynb","timestamp":1724216106870},{"id":"Vskn.ipynb","timestamp":1724216119223},{"id":"GeFl.ipynb","timestamp":1724216187549},{"id":"cPYF.ipynb","timestamp":1724216396505},{"id":"c4Qt.ipynb","timestamp":1724216449518},{"id":"jhLJ.ipynb","timestamp":1724216460947},{"id":"wWs5.ipynb","timestamp":1724216549706},{"id":"3Mzb.ipynb","timestamp":1724216662194},{"id":"ERSG.ipynb","timestamp":1724216760219},{"id":"Z9eZ.ipynb","timestamp":1724216787662},{"id":"UXwg.ipynb","timestamp":1724216831228},{"id":"1l4O.ipynb","timestamp":1724216931156},{"id":"URw3.ipynb","timestamp":1724216947109},{"id":"XNHM.ipynb","timestamp":1724216963909},{"id":"q2dD.ipynb","timestamp":1724217493483},{"id":"jSMB.ipynb","timestamp":1724217524826},{"id":"CMT8.ipynb","source":"renamed.source","sourceDescription":"~/Stuff/Coding/Python/IDS/lab1/lab1.ipynb","timestamp":1724218036275},{"id":"eRzj.ipynb","timestamp":1724218357833},{"id":"YllB.ipynb","timestamp":1724218376652},{"id":"2Pa4.ipynb","timestamp":1724218489164},{"id":"QlKj.ipynb","timestamp":1724218502802},{"id":"BVn0.ipynb","timestamp":1724218777760}]}
|
123
.config/Code/User/History/-2da531bb/hcRb.ipynb
Normal file
123
.config/Code/User/History/-2da531bb/hcRb.ipynb
Normal file
|
@ -0,0 +1,123 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "KeyError",
|
||||
"evalue": "'test'",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
||||
"Cell \u001b[0;32mIn[1], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28mdict\u001b[39m \u001b[38;5;241m=\u001b[39m {\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mRafay\u001b[39m\u001b[38;5;124m'\u001b[39m : \u001b[38;5;241m3.3\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mHassan\u001b[39m\u001b[38;5;124m'\u001b[39m : \u001b[38;5;241m3.7\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mIsham\u001b[39m\u001b[38;5;124m'\u001b[39m : \u001b[38;5;241m4.8\u001b[39m}\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;28;43mdict\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mtest\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m)\n",
|
||||
"\u001b[0;31mKeyError\u001b[0m: 'test'"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"key = 'test'\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"num1 = input('Enter first number: ')\n",
|
||||
"num2 = input('Enter second number: ')\n",
|
||||
"num3 = input('Enter third number: ')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
27
.config/Code/User/History/-2da531bb/j8Ds.ipynb
Normal file
27
.config/Code/User/History/-2da531bb/j8Ds.ipynb
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = [ 'Name' : 'rafay', '' ]"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
147
.config/Code/User/History/-2da531bb/jSMB.ipynb
Normal file
147
.config/Code/User/History/-2da531bb/jSMB.ipynb
Normal file
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
129
.config/Code/User/History/-2da531bb/jhLJ.ipynb
Normal file
129
.config/Code/User/History/-2da531bb/jhLJ.ipynb
Normal file
|
@ -0,0 +1,129 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
148
.config/Code/User/History/-2da531bb/q2dD.ipynb
Normal file
148
.config/Code/User/History/-2da531bb/q2dD.ipynb
Normal file
|
@ -0,0 +1,148 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9\n",
|
||||
"1\n",
|
||||
"0\n",
|
||||
"minimum is 0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[3, 6, 7]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"listlen = int(input('enter length of list'))\n",
|
||||
"list = []\n",
|
||||
"\n",
|
||||
"for i in range(listlen):\n",
|
||||
" list.append(int(input('Enter a number')))\n",
|
||||
"list.sort()\n",
|
||||
"print(list)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
130
.config/Code/User/History/-2da531bb/wWs5.ipynb
Normal file
130
.config/Code/User/History/-2da531bb/wWs5.ipynb
Normal file
|
@ -0,0 +1,130 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"key exists\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"\n",
|
||||
"key = input('Enter key')\n",
|
||||
"\n",
|
||||
"if dict.get(key) is None :\n",
|
||||
" print('key does not exist')\n",
|
||||
"else:\n",
|
||||
" print('key exists')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else:\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"minimum is 20\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"minNum = None\n",
|
||||
"for i in range(3):\n",
|
||||
" num = input('Enter a number')\n",
|
||||
" if minNum is None or num < minNum :\n",
|
||||
" minNum = num\n",
|
||||
" print(minNum)\n",
|
||||
"\n",
|
||||
"print('minimum is', minNum)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"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.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
90
.config/Code/User/History/-2da531bb/wyKA.ipynb
Normal file
90
.config/Code/User/History/-2da531bb/wyKA.ipynb
Normal file
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dict = {'Rafay' : 3.3, 'Hassan' : 3.7, 'Isham' : 4.8}\n",
|
||||
"print(dict['test'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"basicPay = int(input('Enter basic pay'))\n",
|
||||
"\n",
|
||||
"if basicPay < 30000 :\n",
|
||||
" houseRent = 0.3 * basicPay\n",
|
||||
"elif basicPay >= 30000 and basicPay <= 50000 :\n",
|
||||
" houseRent = 0.4 * basicPay\n",
|
||||
"else :\n",
|
||||
" houseRent = 0.5 * basicPay\n",
|
||||
"\n",
|
||||
"netPay = basicPay + houseRent\n",
|
||||
"\n",
|
||||
"print('Basic Pay', basicPay)\n",
|
||||
"print('House Rent', houseRent)\n",
|
||||
"print('Net Pay', netPay)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"num1 = input('Enter first number: ')\n",
|
||||
"num2 = input('Enter second number: ')\n",
|
||||
"num3 = input('Enter third number: ')\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Q5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue