Python Calculator

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Feb 1 23:43:52 EST 2016


Hi Ryan, and welcome!

On Tuesday 02 February 2016 06:30, Ryan Young wrote:

> I am new to Python but have known Java for a few years now. With python,
> so far, so good! I created a simple calculator to calculate the total cost
> of a meal. My variables were tip tax total and order. I am confused about
> how to put in a new 'order' because when i reset the order variable to a
> different number it still calculates the original value. I have sent you a
> picture to help you understand my problem. Thank you so much!

I don't know what they taught you about Java programming, but Python 
programming involves typing text into a text editor or IDE, not editing 
pictures with Photoshop. So if you have a problem, the best way to get a 
solution is to post *code*, not pictures. Copy and paste the code, don't 
retype it from memory.

For the best results, please read this:

http://www.sscce.org/

before re-sending.



Thanks, and good luck,



-- 
Steve



More information about the Python-list mailing list