Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [calculator]

This tag is for questions about calculators.

2
votes
2answers
72 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
46 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. This code is an evolution of my previous code of the same project: ...
4
votes
3answers
332 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: ...
4
votes
1answer
73 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
375 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 ...
4
votes
0answers
65 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
139 views

Calculator in Python 3 using Tkinter

Edit: New version at Python 3 Tkinter Calculator - follow-up I'm a beginner developer and I chose Python as my initial language to learn. This is my very first project: a calculator using Tkinter for ...
5
votes
3answers
128 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
24 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
152 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
124 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
64 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
766 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
125 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
125 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
115 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
106 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
95 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
79 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
57 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
87 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
85 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. But I am ...
5
votes
2answers
243 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
819 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
78 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
2k 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
259 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
54 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
149 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
97 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 ...
2
votes
0answers
73 views

My first Java app: a calculator in Swing

I have created my first Java app. I am very familiar with C++ and thus without reading any books (just introduction, googling and IntelliJ auto-completion) I directly jumped into Java. So I made a ...
8
votes
4answers
3k views

Beginner C++ calculator

I'm relatively new to programming, but am really enjoying it. I have taken a couple of classes but mostly code for fun (for now). I decided to make a program implementing some basic functions, switch ...
6
votes
2answers
128 views

Calculate the cost of cement for a project

I am a newbie in a programming, and I just randomly chose a task for training from some group on Facebook. The task is to calculate the cost of cement for a construction project. The input is the ...
-1
votes
1answer
65 views

Simple Python calculator 5

I am really new to Python and programming in general and I am trying to improve doing some projects like this one. I would like to know how I can improve this the right way. ...
2
votes
1answer
463 views

Simple Java OOP calculator with GUI

I'm learning Java and I've tried to write my own calculator with GUi based on this post. Here is the repo: https://github.com/MurDaD/java-calculator Could someone check my code and tell me how to ...
2
votes
2answers
101 views

Four-function calculator with buttons for digits and operators

I would like make this calculator program more Object Oriented but I'm struggling with how to do it. The calculator works perfectly but I would like to have another class that does the calculations ...
1
vote
1answer
62 views

Beginner's calculator, supporting M, D, A, S operations on two numbers

I'm new to programming and I sort of understand the concept of methods but, I am little overwhelmed by this program and want to shorten it using methods to make it easier to read and understand. <...
0
votes
1answer
81 views

Calculator application by an HTML beginner

I've created a Calculator using HTML, CSS and core JS. I just need some suggestions or ...
8
votes
3answers
2k views

Taxi fare calculator, trip recorder, and fuel calculator

I solved this practice problem in preparation for school exams. The owner of a taxi company wants a system that calculates how much money his taxis take in one day. Write and test a program ...
4
votes
2answers
124 views

C bit mask calculator written using GTK+ 3

I've been studying C on my own using K&R 2nd Edition, and started exploring GTK+ to practice some of the concepts I've learned by making GUI applications. This is the first GUI application I've ...
4
votes
2answers
135 views

Calculator for scoring dives in a competition

I was looking for a light weight coding challenge and found this: In the sport of diving, seven judges award a score between 0 and 10, where each score may be a floating-point value. The highest ...
-1
votes
1answer
254 views

Compound interest calculator homework [closed]

I am a beginner at coding Java and am having a tough time understanding what is wrong with this code. This is an assignment I had posted about earlier and I also went to a Java tutor at my school for ...
11
votes
3answers
1k views

Console calculator for 2 numbers at a time

I'm learning to code for fun, and just finished my first program. I don't know what to think about it since it's my first finished real code, but hey it works! I'm pretty sure that it can be written ...
-2
votes
1answer
250 views

Simple calculator with validation [closed]

I've implemented a simple calculator in C# that takes in the left operand, the operator, and the right operand. Once the calculate button is clicked, I use four methods to validate the inputs: 1. The ...
2
votes
2answers
101 views

JS calculator, respecting order of operations

I have a function that receives an array of numbers and operations Ex: userEntry = [3,+,3,x,3] -> returns 12 It is a calculator that adheres to the proper ...
2
votes
2answers
137 views

JavaScript interest rate calculator

As I am still new to web development, refactoring my code is still something that gives me some trouble. I would really appreciate it if someone could look over the Javascript for an interest rate ...
2
votes
1answer
402 views

Purchase tickets calculation with JavaScript

I'm creating a page where users can purchase an adult, child or senior ticket, each with it's own pricing. Here's the code for review. Please let me know if there are ways to improve upon this code. ...
6
votes
2answers
2k views

Simple JavaScript tip calculator

I've built a fairly simple tip calculator. What I have so far is a bunch of functions to calculate each tip amount and calling each with eventListener. It works ...
2
votes
3answers
2k views

GPA calculator in Java

This is a program I typed up for a project pertaining to GPA calculation. However, I want to find an alternative to if then statements that are NOT conditionals, loops, or arrays. Is there an ...
5
votes
1answer
815 views

Python 3 calculator with tkinter

I have been programming for a long time. Only recently have I decided to take a stab at Python (I should be working with C# as I am in school for it, but I don't care for Windows, long story). I was ...