Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29461

Re: Fwd: Programming Issues

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Fwd: Programming Issues
Date 2012-09-18 22:05 -0400
Organization > Bestiaria Support Staff <
References <CAO1VxVw0xg9Y=5LV4_unpgFzPoSnmVy7-abi4e1-cUxrtvx0Mw@mail.gmail.com> <CAO1VxVx-GWFBL35T5LsnxYxhc0UeOKzndMZN3gsLzusanDsuFQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.899.1348020348.27098.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, 18 Sep 2012 20:47:45 -0400, Nathan Spicer <njspicy@gmail.com>
declaimed the following in gmane.comp.python.general:

> ---------- Forwarded message ----------
> From: Nathan Spicer <njspicy@gmail.com>
> Date: Tue, Sep 18, 2012 at 8:32 PM
> Subject: Programming Issues
> To: webmaster@python.org
>
	Asking the /webmaster/ at 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.
> 
	What were the prerequisites of the class? Everything you need should
have been covered before the assignment was even given. If it wasn't,
you should be asking the instructor.

> 
> 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.
>

	Sounds like a typical second or third assignment in programming;
there must be hundreds of examples out there. 

http://en.wikipedia.org/wiki/Change-making_problem

	All it needs are:

a loop structure around the input
conversion of text input to numeric
a conditional test
modulo arithmetic
an output statement

	So what are you having problems with?
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Fwd: Programming Issues Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-18 22:05 -0400

csiph-web