[Tutor] Urgent: Help

bob gailer bgailer at alum.rpi.edu
Tue Jan 8 00:49:27 CET 2008

Please reply to the list not just me. We all participate and learn.

Shumail Siddiqui wrote:
> I know this assignment is not too hard, but I have been greatly 
> overwhelmed with work as I have been taking a 19 credits recently. I 
> kind of have an approach to this by importing random numbers and 
> random.choice leaves the first four numbers as a result. But, I don't 
> know how to add these numbers in the program, 
One approach is:

start with a total of 0
add the first number to the total
if the total does not reach the goal
add the next number

That can be implemented in a loop.

Give it a try and show us how far you can come.

> while I know that I can use append to add those scores.
I don't know how to use append to add....

More information about the Tutor mailing list