This tag is for questions about calculators.
1
vote
2answers
61 views
A simple pocket calculator
I was searching the internet for some Python exercises, and I've found a lab assignment from University of Toronto. Here's the major of it:
Question 1.
Welcome Message In the if ...
1
vote
1answer
41 views
Basic 4-function Java Calculator with Swing
I can see that there are a lot of java calculators on here, so I hope it hasn't gotten too old. This is a basic 4-function calculator in java using the swing interface. I am positive that it is ...
4
votes
8answers
2k views
C++ calculator using classes
This is my first time using classes objects and functions. What can I improve on?
...
3
votes
2answers
62 views
Quadratic Equation Calculator with Java FX
I have designed a quadratic Equation Calculator with Java FX. It is divided into four separate classes:
GUI.fxml to design the UI
Logic class with the all the ...
1
vote
2answers
101 views
F = MA calculator
This is a calculator for F = MA. (Force = Mass * Acceleration)
I would like a review of my code. I believe that I have gotten better since my last time.
...
6
votes
2answers
76 views
Simple four function calculator in python
I just finished my first Python GUI project, a simple four function calculator. I think I've tested it pretty thoroughly. I'm learning python and OOP, so any critiques would be welcome.
In general, ...
2
votes
1answer
63 views
Number representation for a calculator that works with very big numbers
I'm a beginner: I have learned concepts and features which I think I need in my project, but this is my first serious program and it is my internship project. I'm totally confused and need help to ...
0
votes
0answers
52 views
A simple calculator using an applet
I need help moving my solve code in my calculator into its own separate class.
...
1
vote
0answers
37 views
OOD for reverse polish notation calculator
I am new to OOD and trying to implement a notation calculator in java with OOD concept, attached is my code. It works but I have feeling it's not good especially the factory method is not good. I will ...
3
votes
1answer
75 views
Checking if a bag has enough coins in program
The objective of the program is to check that the weight of the bag that the user inputs and then calculate how many coins are needed to the added/removed to ensure the bag has the right amount of ...
4
votes
1answer
91 views
Student Marking Calculator
This is a student module marks calculator that I was asked to write for a uni revision session in year 2.
Is this a good example of modern C++ code? Is there anything I can improve on or need to ...
0
votes
2answers
52 views
Make simple calculations [closed]
The problem is instead of doing what is stated in the if statements, does the else line like the if statement is false. However, when printed the variables i am working with, seems i have managed to ...
3
votes
0answers
77 views
JavaScript calculator that uses eval
I am new to Javascript and jQuery. I made a calculator by looking at other calculators, codes. I don't know so much Javascript methods, so I stick to eval method ...
2
votes
0answers
48 views
wxPython shipping cost calculator
I developed a cost to ship app in python. To use this app, you will need to install wxpython.
Please review and tell me the areas i can improve.
...
5
votes
1answer
92 views
Basic calculator program in Python
I was writing a basic calculator program to practice my skills at python.
I'm a beginner at Python and was wondering if there is a way to simplify this code of mine? It seems a little bit too long and ...
4
votes
3answers
605 views
For a given balance and an annual interest rate, calculate the minimum fixed monthly payment to pay off debt in a year
Interest is compounded monthly. Payment doesn't vary from month to month.
Version 1
...
4
votes
2answers
57 views
Musical Note Length Calculator in C
This is my first ever program in C and I was just tinkering around with this idea, as I'm on a music based course and the synth plugins all use milliseconds as its time.
Any improvements to make it ...
8
votes
2answers
473 views
Velocity, Distance and Time Calculator
This is a velocity, distance, and time calculator that I wrote not too long ago. How can I improve upon this code?
...
3
votes
2answers
65 views
Python Calculator using tkinter
I created a basic desktop calculator using Python. Does anyone have any suggestions as far as coding best practices, readability issues, or just generic coding mistakes I might have missed? Any ...
4
votes
1answer
61 views
Python adding machine
I was wondering if there is any way to make this code smaller/condensed. It is for a school project which says it has to be as small as it can be and I am not sure whether it can go any smaller.
<...
2
votes
1answer
146 views
BMI calculator as a C++ console application
I am pretty new to coding and I wanted to know how to use header and source files to organize a C++ project. I could not yet find out how I should use header and source files to still have my project ...
6
votes
1answer
143 views
Simple calculator in Android Studio
I have been learning Java for a few months now and have created a basic calculator application in Android Studio for a school project. Since this is my first attempt at programming, I am sure that my ...
6
votes
3answers
102 views
Python calculator
I'd appreciate any comments about my Python calculator, ways in which it can be improved and where it's currently lacking.
...
4
votes
3answers
100 views
GPA Calculator that takes letters or numbers as input
The program is complicated. I didn't call any class because it was hard for me using classes.
Did I do something redundant or did I miss something?
...
0
votes
0answers
56 views
4
votes
3answers
1k views
Reinventing the basic calculator functions
I decided to reinvent the basic calculator functions using only:
the set of positive integers
greater than, less than, and equality properties
increment and decrement
(in other words, the counting ...
4
votes
1answer
92 views
Ohm's Law calculator
I'm looking for ways to make this calculator more efficient and/or make the code a little easier to read.
...
7
votes
1answer
88 views
Sum numbers input from terminal
The following Golang code accepts a sequence of numbers (any integer and float type) in the terminal, adds them, and prints the result (sum) to the terminal.
Actually in Golang you can't add ...
5
votes
2answers
83 views
Pool volume estimator
I am looking to make the following code more efficient since it it rather lengthy. However I need to include in the code constructor classes that include accessor methods for the container number, ...
1
vote
0answers
130 views
Simple React calculator - child/parent component communication
Does anyone have any critique of these ~180 lines of React, specifically this?
...
6
votes
2answers
161 views
Beginners project: calculating area
This was my second project as a beginner in Java programming. Please provide feedback/ tips on my program.
...
3
votes
1answer
120 views
Basic Calculator in Java 8
I was reading this post and saw quite few improvements. So I tried to rewrite it using Java 8 features. Any improvements you can spot, please feel free to mention.
...
3
votes
7answers
309 views
Beginners Java calculator
I am a beginner in Java programming, and I created a calculator as my first Java project. Therefore, can you review my code and provide feedbacks/ tips?
...
7
votes
2answers
817 views
Homework to display a square and calculate tips
Here's a simple school assignment I did:
Problem 1: Write a program that asks the user for a positive integer
no greater than 15. The program should then display a square on the
screen using ...
5
votes
1answer
226 views
Celestial age calculator
Our solar system has 8 planets, including earth. Our calendar has some very confusing concepts such as leap years, which I still don't fully understand. In fact, since where I live, we use a different ...
1
vote
0answers
98 views
Code that checks input for calculator app
I made an Android app, a calculator, that uses buttons for input, Android keyboard is turned off. I have a block of code, that handles the input to string and checks for some things at the same time. ...
2
votes
1answer
97 views
Weightlifting calculator
I'm building a simple iOS app using Swift that calculates the One Rep Max weight a user can theoretically lift. User inputs a weight lifted, the number of repetitions and the app uses one of several ...
10
votes
1answer
275 views
A prefix notation calculator that asks about everything step by step
I made a prefix notation calculator.
Prefix notation, aka Polish notation, is a form of notation for logic, arithmetic and algebra, like infix and postfix (reverse Polish) notation.
The expression '+...
1
vote
1answer
53 views
Value-added tax calculator app
The app calculates the tax which is included in a (given) amount. Because I'm new with both libraries (React.js and Foundation) I would appreciate hints and improvement suggestions.
Live demo on ...
5
votes
2answers
173 views
Simple Area of Shape Calculator
So I made this calculator the other day as a small project. I just wanted to know if I remembered the fundamentals. It works fine from the looks of it, but I know there are always ways to improve.
<...
2
votes
1answer
170 views
Weight-loss calculator
I have a table that holds a user's weight for specific days. In my weights_controller.rb index action I can show these weights - no problem. What I also want to ...
5
votes
3answers
597 views
Simple calculator in C#
It is a basic calculator where the user inputs two numbers, and an operation and the program makes it into an equation and gets the answer. For example, if the user enters number 2 number 3 and tells ...
10
votes
4answers
491 views
Basic calculator that takes 2 numbers and does an operation with them
The code works perfectly fine for me (compiled it in BlueJ and Eclipse) but I was wondering what other more experienced programmers thought of it. I'd specifically like to know if it could be shorter ...
4
votes
1answer
278 views
A very basic JavaScript calculator
I'm just starting out with code. I created a very basic JavaScript calculator.
While writing, I couldn't help but think that there must be easier, faster and less redundant ways to write this. For ...
1
vote
1answer
101 views
Simple four-operation calculator in Lua
I'm a beginner at Lua and programming in general and I just made a simple calculator and I was wondering where I could make improvements.
...
5
votes
2answers
110 views
My JavaScript calculator
I am playing a bit with vanilla JavaScript and created a simple JavaScript calculator using eval(). Any suggestions for improvements?
...
14
votes
3answers
168 views
Circumference and Area of a Circle in COBOL
I recently started Learning COBOL from Lynda and this is my code for the first challenge .
The Objective is that the user will provide the radius and we have to calculate the Circumference and the ...
7
votes
1answer
264 views
Basic C# calculator code
I have not had any experience with coding before, and after beginning to learn I stated working on this calculator which runs different functions on the console. I'd like to hopefully be taught what I ...
1
vote
1answer
50 views
Speed-Distance-Time Calculator in Rust 1.8
Whenever I try a new language I always try to write a speed-distance-time calculator as well as possible. I did this with C++ a while ago now. This is a similar question but this time in Rust.
The ...
3
votes
4answers
456 views
A simple command-line calculator
I created a simple command line calculator, and then after some reading I made a few tweaks and then remade it with a friends idea to make it more simpler. I'm wondering if this can be more optimized ...