Comments (5)
If you think the existing code is relevant, that is fine. There can be more functionality and you can simply add functionality by import 'math'.
import math
math.sqrt(num)
Plus the existing code has limitations, only going up to an extent. If you want a calculator that can give you answers to questions involving big numbers, then you can cut down the code a lot and add new functionality in the lines he has already used. Simply -
import math
def add(num1 = None, num2 = None):
answer = num1 + num2
return answer
def subtract(num1 = None, num2 = None):
answer = num1 - num2
return answer
def multiply(num1 = None, num2 = None):
answer = num1 * num2
return answer
def divide(num1 = None, num2 = None):
answer = num1/num2
return answer
# And so on
And plus he can add a GUI to his program using Tkinter.
What's more is that you can use NumPy for certain operations as well
from my_first_calculator.py.
I guess this is not the best way to solve the problem, for me, the calculator is doing it's job very well.
from my_first_calculator.py.
I really like how he's doing it, I don't think it needs to be changed...
from my_first_calculator.py.
As @AceLewis points out -
Read the readme and you may get some context. This is not supposed to be good code it is literally a joke.
And as @elsilentforce says -
I guess this is not the best way to solve the problem, for me, the calculator is doing it's job very well.
Plus most of the issues here are not really issues but a bunch of funny conversations. As @v1993 comments -
Just for lulz probably
And most people are now saying that if this code is ever going to change or be optimised, then the best way is to make functions and calling them whenever you want. -
Put a calculator in a function to call this function again when the code ends - @Artaman
And many people are saying that the code is crashing their browsers -
I haet u. u crashed my browser - @TheInitializer
Same issue here - @ahmedouvic
So this why I think that -
- This is the best way to increase efficiency of the code
- Add more functionality without crashing anybody browsers
😄
from my_first_calculator.py.
I think this issue has already had a satisfying answer, that the my_first_calculator.py code was generated by another piece of code called generator.py. So, I am going to be closing this issue
from my_first_calculator.py.
Related Issues (20)
- I need unit tests for it
- Add support to float HOT 1
- 3/10 needs more LoC
- Docker Support? HOT 1
- Align divide output digit
- Add support for 3 digit multiplications please HOT 2
- Greetings from Informaticautisme HOT 9
- skill HOT 1
- wat
- no
- Microsoft, hire this man! HOT 1
- My first calC
- GOOD JOB!!!!!
- 😂😂😂😂😂
- This really helped me in my math class THANK YOU
- Wasm support
- it's day 60 and i'm still scrolling down
- Calc
- when rust
- It helped me a lot writing my phD in Math in Harvard community University! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from my_first_calculator.py.