diff --git a/tsk1.ipynb b/tsk1.ipynb new file mode 100644 index 0000000..6ba1dbb --- /dev/null +++ b/tsk1.ipynb @@ -0,0 +1,66 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 18, + "id": "82fb29a1", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "original amount: 33.0\n", + "discount: 1.6500000000000001\n", + "final amount: 31.35\n" + ] + } + ], + "source": [ + "amount = float(input(\"enter the amount: \"))\n", + "if amount >= 1000 :\n", + " discount = amount *0.20\n", + "elif amount >= 500 :\n", + " discount = amount *0.10\n", + "else :\n", + " discount = amount *0.05\n", + "\n", + " final_amount = amount - discount\n", + "print(\"original amount:\", amount)\n", + "print(\"discount:\" ,discount)\n", + "print(\"final amount:\",final_amount)\n", + "\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d8fa6654", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "vidhi", + "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.2" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}