#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    My first project - Lotto Simulator


    Hello everybody, I would like to create a python script that simulates a lotto draw. I would like the user to select 6 number and then have those numbers constantly compared to a set of 6 randomly generated numbers in order to see how long it takes to get a match of six.

    If somebody could help me get started i'd very much appreciate it.
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    web site about lotto prizes and probabilities

    One way to get input

    convert a string to an integer is conveniently the next function following input.

    Scroll around until you find list() on same web page.

    program sequence (flow control) information

    picking "random" numbers

    Run the python3 interpreter.
    Enter as follows:
    >>> help(input)

    study.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    Thanks


    Thanks for the links, i'll do some reading!

IMN logo majestic logo threadwatch logo seochat tools logo