On 2012/02/07 07:40 AM, Michael Lewis wrote:
I want to prompt the user only once to enter 5 numbers. I then want to
create a list out of those five numbers. How can I do that?
I know how to do it if I prompt the user 5 different times, but I only
want to prompt the user once.
Thanks.
--
Mic
Hi Michael,
I bet there is a better way (which I would like to see), but here is what I
have come up with for my own uses.
"""
ints = []
u_in = False
while u_in == False:
try:
u_input = raw_input('please enter 5 integers, space separated\n
')
for n in
I want to prompt the user only once to enter 5 numbers. I then want to
create a list out of those five numbers. How can I do that?
I know how to do it if I prompt the user 5 different times, but I only want
to prompt the user once.
Thanks.
--
Michael