Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6ab2452

Browse files
Add Calculator Project
Implements a basic calculator in python that performs addition, subtraction , multiplication ,and division using user input.
1 parent b9508ec commit 6ab2452

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

‎Simple_calculator.ipynb

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"id": "3c1c8cdb-3978-4a2b-ab01-c0852e1b46f5",
7+
"metadata": {},
8+
"outputs": [
9+
{
10+
"name": "stdout",
11+
"output_type": "stream",
12+
"text": [
13+
"The value of 128 + 24 is: 152\n",
14+
"The value of 128 - 24 is: 104\n",
15+
"The value of 128 * 24 is: 3072\n",
16+
"The value of 128 / 24 is: 5.333333333333333\n"
17+
]
18+
}
19+
],
20+
"source": [
21+
"a=128\n",
22+
"b=24\n",
23+
"print(\"The value of\",a, \"+\", b,\"is:\", a+b)\n",
24+
"print(\"The value of\",a, \"-\", b,\"is:\", a-b) # SIMPLE CALCULATOR \n",
25+
"print(\"The value of\",a, \"*\", b,\"is:\", a*b) \n",
26+
"print(\"The value of\",a, \"/\", b,\"is:\", a/b)"
27+
]
28+
},
29+
{
30+
"cell_type": "code",
31+
"execution_count": null,
32+
"id": "22a37ff7-7fc6-4142-8fb8-64d013dd0340",
33+
"metadata": {},
34+
"outputs": [],
35+
"source": []
36+
}
37+
],
38+
"metadata": {
39+
"kernelspec": {
40+
"display_name": "Python [conda env:base] *",
41+
"language": "python",
42+
"name": "conda-base-py"
43+
},
44+
"language_info": {
45+
"codemirror_mode": {
46+
"name": "ipython",
47+
"version": 3
48+
},
49+
"file_extension": ".py",
50+
"mimetype": "text/x-python",
51+
"name": "python",
52+
"nbconvert_exporter": "python",
53+
"pygments_lexer": "ipython3",
54+
"version": "3.12.7"
55+
}
56+
},
57+
"nbformat": 4,
58+
"nbformat_minor": 5
59+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /