top of page

# simple arithmetic calculator by python

Everyone need simple calculator in his daily life so in this program we calculate simple calculation like addition, subtraction …

In this program I start by taking two number from the user and the operator that he need

```fnum=float(input("Enter Your First Number"))

then I use if condition to calculate the Arithmetic operation :

```if op =="+":
```

*subtraction operation:

```elif op=="-":
sub=fnum-snum
print("The Result is"+ str(sub))```

*multiplication operation:

```elif op=="*":
multi=fnum*snum
print("The Result is"+ str(multi))

```
`*division operation:`
```elif op=="/":
div=fnum/snum
print("The Result is"+ str(div))
```

* reminder operation:

```elif op=="%":
rem=fnum%snum
print("The Result is"+ str(rem))```

program code:

```fnum=float(input("Enter Your First Number"))
if op =="+":
elif op=="-":
sub=fnum-snum
print("The Result is"+ str(sub))
elif op=="*":
multi=fnum*snum
print("The Result is"+ str(multi))
elif op=="/":
div=fnum/snum
print("The Result is"+ str(div))
elif op=="%":
rem=fnum%snum
print("The Result is"+ str(rem))```