Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eduardorodriguesf/calculator
Desktop software made using Python and PyQt5
https://github.com/eduardorodriguesf/calculator
calculator gui pyqt5
Last synced: 6 days ago
JSON representation
Desktop software made using Python and PyQt5
- Host: GitHub
- URL: https://github.com/eduardorodriguesf/calculator
- Owner: EduardoRodriguesF
- Created: 2020-03-05T23:10:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-12T11:22:16.000Z (over 4 years ago)
- Last Synced: 2024-11-12T10:11:32.287Z (2 months ago)
- Topics: calculator, gui, pyqt5
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Calculator
A calculator made with Python 3.8
## What have I learned with the project?
#### GUI Design
While using the PyQt5 Designer tool, I was able to learn about the software's workplace and how to use it in code to display whatever I want.
#### Counting, separating and controlling strings
My calculator software was made in such a way that everytime you press a button, it adds it to a string displayed on top of the window, or it manipulates the string to involve certain numbers within functions.
```python
count = count[:index] + 'sqr(' + count[index:] + ')'
# the code above puts latest numbers after an operator (+, -, * or /) in between square function
# 'index' represents those numbers
```Once you press `=` the program uses `eval()` to calculate the string
## Setting up
Assuming you already have Python and `pip` installed, to run the program you will need to get the following packages:
* PyQt5
* Regex
* Math
For that, you just need to use the commands bellow in your Command prompt:
```
> pip install pyqt5 regex math
```
Now you should be able to use it by running `script.py`