Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102393 > unrolled thread
| Started by | Ryan Young <ryand.young@menloschool.org> |
|---|---|
| First post | 2016-02-01 11:30 -0800 |
| Last post | 2016-02-02 15:43 +1100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Python Calculator Ryan Young <ryand.young@menloschool.org> - 2016-02-01 11:30 -0800
Re: Python Calculator Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-02-02 15:43 +1100
| From | Ryan Young <ryand.young@menloschool.org> |
|---|---|
| Date | 2016-02-01 11:30 -0800 |
| Subject | Python Calculator |
| Message-ID | <mailman.7.1454357507.3032.python-list@python.org> |
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! Ryan Young
[toc] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2016-02-02 15:43 +1100 |
| Message-ID | <56b0340b$0$1524$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #102393 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web