Simulator
This lesson contains instructions about running the simulator that mimics the lottery scheduler.
This program, lottery.py
, allows you to see how a lottery scheduler
works. As always, there are two steps to running the program. First, run
without the -c
flag: this shows you what problem to solve without
revealing the answers.
prompt> ./lottery.py -j 2 -s 0
...
Here is the job list, with the run time of each job:
Job 0 ( length = 8, tickets = 75 )
Job 1 ( length = 4, tickets = 25 )
Here is the set of random numbers you will need (at most):
Random 511275
Random 404934
Random 783799
Random 303313
Random 476597
Random 583382
Random 908113
Random 504687
Random 281838
Random 755804
Random 618369
Random 250506
]
Get hands-on with 1400+ tech skills courses.