Questions tagged [calculator]

This tag is for questions about calculators.

Filter by
Sorted by
Tagged with
1
vote
2answers
88 views

Java Calculator with GUI

I've wrote a calculator in Java with a GUI using swing. Here are the classes: Control.java: ...
1
vote
1answer
56 views

A calculator with support for large integers and variables

I'm quite new to both Java and OOP. I'm assuming that pretty much everything about my code can be improved and I appreciate any feedback. However, I am particularly interested in what you think ...
4
votes
2answers
753 views

C++ cleaner optimised code, Calculator

This code currently works i wonder if i could make any optimisations or anything to make the code appear cleaner using functions or whatnot, suggestions are welcome! ...
3
votes
3answers
383 views

First calculator in c++, tips for optimisation

So this is my first attempt at making a calculator in c++, and i'm looking for experienced people to pinpoint what i could do better to make my calculator run better! *please note that i had to ...
12
votes
4answers
1k views

Reverse Polish Notation (RPN) Calculator

I am trying to solve a codewar challenge (link): Your job is to create a calculator which evaluates expressions in Reverse Polish notation. For example expression ...
-2
votes
1answer
117 views
4
votes
1answer
123 views

Calculator using Shunting Yard algorithm

I have implemented a simple calculator using the Shunting Yard algorithm. It takes infix expression as an input "3 + 5 * 2", which evaluates and returns the value 13. ...
4
votes
2answers
87 views

JavaRPN (Updated)

I have previously worked on this program in this question, and have gotten some very good answers and help! Now, I have done some more work on the program, and would love if you could give me honest ...
3
votes
1answer
153 views

Simple calculator in Python

This is my first ever Python program. I thought I would make a calculator that performs 5 operations: add, subtract, divide, multiply, power. I am aware Python has its own power function, called "pow",...
6
votes
2answers
216 views

Made my own simple calculator

So I made this calculator in c# console, I'm pretty nooby-ish in programming. I want to know if I can make it better, because my coding skills suck. Pretty sure my logic sucks too. Any advice and ...
9
votes
6answers
677 views

Sum and average calculator

I've just written some code in an online compiler, and since I'm very new to C#, I wanted to ask what could be improved about the code. The task of the program is simply to add up the numbers the ...
1
vote
2answers
101 views

Very simple calculator with four basic operations using only if/else statements

I created a simple calculator with multiplication, division, addition, and subtraction. Is there a way to write it shorter? I am a beginner so I do not know much about programming other than if...else ...
6
votes
2answers
135 views

JavaRPN calculator

I have found that there is a distinct lack of an RPN calculator available to me, so I decided to make my own. I am still adding new functions to it, but as of now, I would like to refactor my code. ...
3
votes
1answer
79 views

Calculate Cash Flow

I have written a cashflow calculator. Any suggestions on how to improve the code below? Income and expenses have a similar pattern. ...
5
votes
2answers
154 views

Code Challenge: basic arithmic operations using only incrementation operator

Challenge Write a function that takes 2 integer operands left and right (both >= 0) and evaluates one of the following ...
6
votes
2answers
77 views

Basic console calculator with four operations

I'm an absolute beginner in programming, and Today I decided to put my knowledge to the test and create a basic c# calculator. I've Done it, but now I'm looking for ways to Make it more shorter and ...
4
votes
2answers
111 views

React.js calculator

I have a calculator (in React) and I wonder if the way I did is is good or what I could improve. I wanted to do it like the iphone calculator (you dont only see results when you press =) and I feel ...
5
votes
1answer
589 views

Object-oriented calculator

I have solved an assignment (Exercise 3) from the MOOC Object-Oriented programming with Java, part II, but I'm not enrolled in said course. Assignment Summary: Make a simple calculator. You ...
4
votes
1answer
575 views

Python Calculator using Postfix Expressions

Improved upon my previous calculator program. This program has the following features: Gives information using session prompts. Supports all common operators. Follows operator precedence. Use of ...
1
vote
1answer
191 views

Cube root in Python 3 using Bisection Search: Numbers in -1 to 0 [closed]

Here is my code, which doesn't seem to work for numbers in between -1 and 0 (works perfectly fine otherwise) I think the code enters an infinite loop, somehow, hence I get no result after entering ...
2
votes
2answers
217 views

Loan repayment calculator

I am having some trouble figuring out how to modularize this code without rewriting it entirely. I know I should be able to break it up into modules for main, gathering info, doing calculation and the ...
1
vote
0answers
91 views

Python 3 Tkinter Calculator - follow-up

I'm a beginner developer, and it's my very first project: a simple math operations calculator in Python 3 using Tkinter for GUI. Obs: This code is an evolution of my previous code of the same project:...
4
votes
3answers
375 views

Python program for a simple calculator

I have written a program for a simple calculator that can add, subtract, multiply and divide using functions. Here is my code: ...
5
votes
1answer
118 views

A simple python3 calculator

Made a very simple calculator in Python. The program has the following features: All the basic operators can be used. '+', '-', '*', '**', '/', and '//'. The user can start the program again. The ...
6
votes
3answers
381 views

Class Activity Calculator

Introduction Class Activity Calculator is an online application to calculate the students' class activity grades. The class activity grade (CA) is calculated based on the marks a student gets during ...
5
votes
1answer
120 views

Straightforward tax calculator OO design

Similar questions have been asked here before and my solution is pretty much in line with some of the answers. I wanted to work on this a bit. Scenario Basic sales tax is applicable at a rate ...
6
votes
2answers
193 views

Calculator in Python 3 using Tkinter

Edit: New version at Python 3 Tkinter Calculator - follow-up New status: I´ve refactored the code trying to follow the recommendations from the guys who answered this question. The new version is on ...
5
votes
2answers
369 views

Simple BMI Calculator (Python 3)

As my first Python program I have written a simple BMI calculator. I want to know how i can improve this program. Would functions be useful? How can I improve the way that it is presented? ...
3
votes
1answer
32 views

Mortgage calculator with Swing for Helsinki MOOC

New to Java, just finished the Helsinki MOOC course. I programmed a basic mortgage calculator as my first solo project and while it works, I have a few questions about coding style: The listener and ...
8
votes
2answers
809 views

First Python GUI Calculator with exponentiation function and percents

I made my first Python project with the help of Tkinter. I was trying to make it works like iPhone calculator. I am a beginner and I am looking for ways to improve my code. I use PyCharm and got rid ...
2
votes
3answers
128 views

Simple exchange calculator in Java - structure and tests

I am trying to learn how to correctly structure my projects and write a good, clean code. I would also like to learn how to write good tests. Can you please review it and give me some tips and tricks ...
1
vote
1answer
70 views

Calculator for any number of inputs

The "nasty implementation" I mentioned is within the void calculator() inside of calculator.cpp. Everything goes well as long as ...
5
votes
3answers
846 views

Calculator final project in Python

In my final project for my Python course, I am required to create a calculator program. I really need someone to look over my code and tell me if I have met all the requirements for this project. ...
7
votes
1answer
129 views

Just a calculator

This is a simple calculator made in 2/3 hours. I am still new and I was trying out some tags. If you can add some comment and say what to do and what to improve I will be really grateful. ...
3
votes
3answers
149 views

Writing a calculator in idiomatic Java

I just dipped my toes in Java today (coming from C++) and made a few things to learn it. The standard stuff like Atari Breakout, Tic Tac Toe and this calculator. This has been done so many times ...
5
votes
2answers
245 views

Area and volume calculator

I'm a beginner coder, doing it solely for fun, having started coding about two months ago with Python. I have a working piece of code for calculating area and volume of different geometric shapes, ...
3
votes
1answer
111 views

First python program: basic calculator

I want to start learning python for fun and so I could dig into machine learning projects later in the future maybe. I started off with a small calculator project just to get the hang of the language ...
4
votes
1answer
347 views

Python binary calculator

My task was to build a calculator in Python supporting binary addition etc. To begin I define a couple of custom exceptions : ...
2
votes
1answer
91 views

A basic calculator in C that uses a loop

I have created a program that forms a basic calculator in C which includes the basic operations like addition, subtraction, multiplication and division. But in this case I decided to use a Do-While ...
0
votes
0answers
231 views

BMI calculator with React Hooks

I wrote this Body-Mass Index calculator as part of a test. I'm new to React Hooks so I'm not sure whether this is good practice or not. When it comes to the component implementation and the tests, I'm ...
0
votes
2answers
666 views

Loan calculator in C

I wanted to create a loan calculator, but the code I could think of was using 3 functions, and calling them and getting result. But I felt it was easy but bad code because I thought this can be ...
-1
votes
3answers
127 views

A Java Calculator that could perform basic Mathematical Operations [closed]

I've been working for few days to develop a basic Java Swing Calculator that could Add, Subtract, Multiply or Divide two numbers and also has other options like inverse(1/x) and square root I would ...
5
votes
2answers
480 views

Simple calculator in C# WPF

I'm beginning to learn WPF and wanted to do a quick exercise. The code is as simple as it gets but I tried to evaluate each and every possible edge case. Any improvement is welcome, thanks. C#: <...
7
votes
3answers
956 views

C++ arithmetic on two numbers [closed]

I need someone with experience to judge my first project to let me know what I have to work on. I recently started learning C++ using resources like Solo Learn and Bucky's tutorials on YouTube hoping ...
2
votes
3answers
121 views

Free time calculator

I started learning Python 2 about a week ago, using Codecademy and Stack Overflow answers to help me learn. I wrote a code to calculate the user's free time based on user sleep and work time. It also ...
14
votes
3answers
3k views

BMI calculator in python using if statements

I am a beginner in the python language. I wrote a BMI calculator and I am wondering if there are any improvements I could make to the code. This is the code below: ...
3
votes
3answers
267 views

Calculate with numbers from different number systems

This program calculates with numbers from different number systems and outputs the result in the desired number system. You call it like that: ...
0
votes
1answer
58 views

Calculating the volume of a box

I've been studying more C using C Programming: A Modern Approach: A Modern Approach 2nd Edition by K.N. King as well as reading the comp.lang.c FAQ and the Code Review section here on Stack Exchange ...
3
votes
2answers
181 views

Simple C# calculator

I'm doing a simple calc for my school. The code looks okay to me, but I'm not sure if there is something to improve, but probably there is always something to improve. Any ideas how to make it look ...
2
votes
2answers
106 views

Calculator to add time intervals

I have written a little program that calculates the time by given strings. A time string in the context of this program consists of a number and a following letter that can be s, m, h, or d. You can ...