11 Reusable Code Snippet Topics
Remove Filter
|
|
It could be simplifide more, I know. I was doing it as an exersise so its rough and skecthy. But it's workable, I tested it more then 50 times. |
|
This is the updated version of the Tiny Tkinter Calculator. It has more power, since you can type in functions contained in the Python math module then press the equals key. You can then move the result into memory for other calculations. The code is written in OOP class style … |
|
I needed a calculator and I didn't want to use google since my internet is slow. So I made one! Here it is. Working with it is simple. Use the number and operation keys("c" for clear, "p" for pi, and "s" for sqrt) as well as the return and enter … |
|
Here little debugged version of my calculator posted earlier in GUI calculator thread. I prepared it after listening that their teacher did more limited calculator in around 150 lines of code with their graphics module. This is 115 lines without empty lines and comment lines [CODE]>>> li=[i for i in … |
|
Hello. This code snippet is a basic calculator. The general concept is that the calculator accepts infix expressions as strings, converts them to reverse polish notation by way of the shunting-yard algorithm and then evaluates the resulting expression. I tried to encapsulate the functionality of each piece so that, in … |
|
This is a series of 3 code snippets which together form a completly working "calculator". I used a console application in VS C# 2008, but 2005 should cause no problems. To start with : here you have the code for a scanner class. A scanner reads the inputline and tries … |
|
Very trivial program which could be thought as conclusion from the Quiz posts (thanks Gribouillis for inspiration for format) |
|
This function I did to improve calculator program by eliminating problems with Pythons problem of dividing integer with integer and giving integer division result. |
|
This is the last part. This is the code that sets it al together and lets the parser and scanner do some work. Happy calculating! |
|
Here is the second piece of code. The parser tries to interpret the tokens it gets from the scanner. |
|
Just a small Python program to calculate monthly payments and other costs. I have compared it with some of the calculators available from many of the online mortgage companies, and results seem to match. |
The End.