No .exe file but the code is one .py file
Scripting a calculator with the bois ... YES.
- Βασίλειος Κατωτομιχελάκης Π2020132
- Χαράλαμπος Μακρυλάκης Π2019214
- Αθανάσιος Καλαμάτας Π2020150
- Παναγιώτης Καράτζιας Π2020142
This Python application is designed to provide a simple and user-friendly calculator in Greek. It supports both basic and complex calculations while offering a customizable user interface. The calculator is built using a graphical user interface (GUI), enhancing usability and accessibility for users.
Our goal was to create a Greek-language calculator that is not only easy to use but also provides support for both simple and complex calculations. To achieve this, we built the application using a Graphical User Interface (GUI) with Python.
- Python: Core programming language.
- Qt for Python: GUI framework used to design the layout with buttons, text fields, and a menu bar. It also allows customization of colors.
- numexpr & math libraries: Used for arithmetic calculations.
- datetime module: Used for age calculation.
The application provides two main modes:
-
Standard
A basic calculator for simple arithmetic operations. -
Scientific
A scientific calculator that supports complex mathematical functions.
- Modes List
This feature allows users to calculate their BMI based on their weight and height, providing insights into their physical health.
The age calculator lets users compute their exact age in years, months, and days based on their input.
Various unit conversion options are available, such as converting between MegaBytes (MB) and TeraBytes (TB).
This feature allows users to calculate the final price after a discount is applied by entering the discount percentage and the original price.
The user can modify the application's theme and colors, making the interface more personalized and visually appealing.
The code arranges the Qt objects (buttons, text fields, etc.) within the layout, ensuring they appear correctly in the application window.
Each arithmetic button corresponds to a number, and when pressed, it displays the appropriate number in the display box. This logic is handled using separate functions and boolean variables that manage the button interactions.
The calculate_age
function takes the user's input in the form of day/month/year (D/M/Y), performs the necessary calculations, and converts the result into a string, which is then displayed in the symbol_box_age
.