+ 2
How to make a calculator (or any app) using Python?
I want to make a calculator which works on mobile or computer.
6 Answers
+ 11
#Function with return
def sum (x, y):
return x + y
# Call the function here
print( sum(5,4) );
You can apply this logic to all operation, good luck. It will works on every device with an IDE.
+ 11
Do you mean with a GUI?
Learn something about Tkinter for convert that code in a graphic application.
After that, there are many tools (I tried py2exe only) for convert your Python script in a ".exe" software.
+ 1
@Maz I know the logic i want to know how to convert this in to a real life working calculator
0
thank u so much @Maz
- 1
Nice !!! In 4 lines another one with trigonometry , deep learning or any existing python package. Plus some serious security holes !
https://code.sololearn.com/cXmeQ5FUwpsQ/?ref=app