[Tutor] counting number of inputs

Python python at venix.com
Wed May 3 01:56:41 CEST 2006


On Tue, 2006-05-02 at 19:25 -0400, MICHELLE EVANS wrote:
> I am trying to count the number of times a positive number is entered
> from the user.  But, the program must stop after 5 user inputs or a
> negative number.
>  
> Can anyone help.
Yes, but you need to help yourself also.

Do you know how to get input from the user?
Do you know how to count things in Python?
Do you know how to test a number to see if it is positive or negative?

Why don't you post your code for any part of this problem and explain
how it is supposed to work and where you are having difficulty.  If
necessary, review some of the tutorials to get some pointers on writing
Python programs.

We're happy to help you learn, but do not want to simply write your
program for you.

> Rick
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
-- 
Lloyd Kvam
Venix Corp



More information about the Tutor mailing list