update
This commit is contained in:
parent
2992f4f408
commit
4f46de8d00
3330 changed files with 394553 additions and 76939 deletions
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue