Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 53 additions & 4 deletions Notebook1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,67 @@
"print(x + y)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "48fdbd21",
"metadata": {},
"outputs": [],
"source": [
"name = \"Sakshi\"\n",
"hieght = 5.2\n",
"age = 20\n",
"Sakshi_List = [1,2,3,4,5,6,7,8,9,10]\n",
"Sakshi_Dict = {\n",
" \"Roll no\":21,\n",
" \"Branch\":\"CSE\",\n",
" \"Cgpa\": 8.23,\n",
" \"Section\":\"A\",\n",
" \"Above 18\": True\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "14e352ce",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Name: Sakshi\n",
"hieght: 5.2\n",
"age: 20\n",
"List: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n",
"Dict: {'Roll no': 21, 'Branch': 'CSE', 'Cgpa': 8.23, 'Section': 'A', 'Above 18': True}\n"
]
}
],
"source": [
"print(\"Name: \",name)\n",
"print(\"hieght: \",hieght)\n",
"print(\"age: \",age)\n",
"print(\"List: \",Sakshi_List)\n",
"print(\"Dict: \",Sakshi_Dict)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ca9af74b",
"id": "c4ddd91b",
"metadata": {},
"outputs": [],
"source": []
"source": [
"code_list = [1,2,3,4,5,\"a\",\"b\", 6,7,8,True,1,2]\n",
"print(code_list)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "myenv",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -45,7 +94,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.7"
"version": "3.13.9"
}
},
"nbformat": 4,
Expand Down
83 changes: 83 additions & 0 deletions Task1.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 7,
"id": "2d77b295",
"metadata": {},
"outputs": [],
"source": [
"amount = float(input(\"enter amount\"))\n",
"\n",
"if amount >= 500:\n",
" discount = 6\n",
"elif amount >= 1000:\n",
" discount = 10\n",
"elif amount >= 5000:\n",
" discount = 15\n",
"\n",
"else:\n",
" print(\"Invalid amount\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "7745bd5d",
"metadata": {},
"outputs": [],
"source": [
"dis_amount = amount * discount\n",
"Final_amount = amount - dis_amount"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "0d44208c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"------ BILL SUMMARY ------\n",
"Original Amount : 700.0\n",
"Discount Applied: 600 %\n",
"Discount Amount : 4200.0\n",
"Final Payable : -3500.0\n"
]
}
],
"source": [
"print(\"\\n------ BILL SUMMARY ------\")\n",
"print(\"Original Amount :\", amount)\n",
"print(\"Discount Applied:\", discount * 100, \"%\")\n",
"print(\"Discount Amount :\", dis_amount)\n",
"print(\"Final Payable :\", Final_amount)"
]
}
],
"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
}