Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29459 > unrolled thread
| Started by | Dave Angel <d@davea.name> |
|---|---|
| First post | 2012-09-18 21:20 -0400 |
| Last post | 2012-09-18 21:20 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Fwd: Programming Issues Dave Angel <d@davea.name> - 2012-09-18 21:20 -0400
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2012-09-18 21:20 -0400 |
| Subject | Re: Fwd: Programming Issues |
| Message-ID | <mailman.897.1348017684.27098.python-list@python.org> |
On 09/18/2012 08:47 PM, Nathan Spicer wrote: > ---------- Forwarded message ---------- > From: Nathan Spicer <njspicy@gmail.com> > Date: Tue, Sep 18, 2012 at 8:32 PM > Subject: Programming Issues > To: webmaster@python.org > > > Hello, > > My name is Nathan Spicer. I'm taking a computer programming class using > python. I have a project that's due in a week and I'm not certain how to d > this. I'm totally new to this form of programming. I've stated the scope of > the project below. Any form of help would be great. > > > Ask the user for the amount of change expressed in cents. Your program must > compute and display the number of half-dollars, quarters, dimes, nickels, > and pennies to be returned. > Return as many half-dollars as possible, then quarters, dimes, nickels, and > pennies, in that order. > Your program must allow the user to continue entering different amounts of > change until they enter 0 to indicate they are finished. If the user enters > a negative number, inform them of their mistake and ask them to enter a > correct value. > > -Code that is formatted to be easy to read > > Thank you for your time, > Nathan Spicer > > > What version of Python are you learning? And you're stuck where? There are lots of ways to ask a user a question, ranging from raw_input() to presenting a wxPython dialog box. The choice depends on what version you're using, and what GUI library if any you have available. Then you have to validate the string you get, and then do some computations, displaying the result. The whole thing needs to be inside a loop. Show us the code you've got so far, and indicate where the exception is happening, with full traceback. -- DaveA
Back to top | Article view | comp.lang.python
csiph-web