Catherine > I've spend some time going throught the many available turorials, but find > it hard to get good exercises to try out what you learn.
Most tutorials do have a few suggested exercises but the best way is to take the examples they give and modify them to see what happens. The reason for that is you are starting with a working outline which is much easier than starting with nothing. However one source of small project ideas is "Useless Python". Have you seen that web site? It includes all sorts of little programs that people have written plus lots of projects that have been suggested, some very small others quite ambitious. So far as I know Useless Python is a unique concept in programming languages, but I think its great for beginners! (And don't forget to visit the 'old site' because it has more content than the new - but less well organised!) HTH, Alan G Author of the learn to program web tutor http://www.freenetpages.co.uk/hp/alan.gauld On 1/21/06, Bradly McConnell <[EMAIL PROTECTED]> wrote: > > Greetings all: > > I'm new to Python, and have come across and exercise that basically > counts to 100. The idea is to accept user input for an initial > number, and then let the user add additional numbers. I wanted to > give feedback if a number selected would bring the total above 100, so > the user would select a lower number. It looks like I have it > working, but it doesn't seem very efficient. I would like any hints, > help, or comments that you can provide. Below is what I have so far. > > number = input("Please enter a number: ") > while number != 100: > additional_number = input("Please enter an additional number: ") > if additional_number + number > 100: > lower_number = input("please enter a lower number: ") > if lower_number + number > 100: > lower_number = input("Lower!") > else: > number = lower_number + number > elif additional_number + number < 100: > number = additional_number + number > else: > continue > > print "Done", number > > > Brad > _______________________________________________ > Tutor maillist - [email protected] > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
