On 09/18/2012 08:47 PM, Nathan Spicer wrote: > ---------- Forwarded message ---------- > From: Nathan Spicer <njsp...@gmail.com> > Date: Tue, Sep 18, 2012 at 8:32 PM > Subject: Programming Issues > To: webmas...@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 -- http://mail.python.org/mailman/listinfo/python-list