2011-10-22, 07:46 PM
I hate to double post, but I didn't want to start a new thread.
Here is the second part of this assignment:
Now my brainstorming got me to the point of using inputs in place of the min and max(1, 50) and the number of numbers(:6), I tired using variables for them, but I guess I'm too much of a noob to do any of this.. Also, I have no idea of where to use this "numlist" he speaks of.
Here is the second part of this assignment:
Code:
Your previous lottery number generator would work for selecting Lotto 6/49 numbers but other lotteries use different sets of numbers and different lengths of lists. It would be much more useful if we could have a program that would let the user input the minimum and maximum values for the random generated numbers as well as the number of random numbers needed, like this:
>>> How many random numbers do you need generated?
5
>>> What is the minimum value of random number?
1
>>> What is the maximum value of random number?
20
>>> [2,17,4,12,9]
Write a program called lotto2.py that will get input from the user for the number of random numbers to be generated, the minimum value and the maximum value. It should include a function called "numlist" that will take those three values as parameters then return (*not print*) the list of random values.Now my brainstorming got me to the point of using inputs in place of the min and max(1, 50) and the number of numbers(:6), I tired using variables for them, but I guess I'm too much of a noob to do any of this.. Also, I have no idea of where to use this "numlist" he speaks of.

