Jul-04-2019, 07:00 PM
Hi,
I took python code for sudoku game and when I run the code i ran to error "out of range" please help me with this one.
I took python code for sudoku game and when I run the code i ran to error "out of range" please help me with this one.
import sys from Sudoku.Generator import * # setting difficulties and their cutoffs for each solve method difficulties = { 'easy': (35, 0), 'medium': (81, 5), 'hard': (81, 10), 'extreme': (81, 15) } # getting desired difficulty from command line difficulty = difficulties[sys.argv[2]]I get the following error:
Traceback (most recent call last): File "C:/Users/ramit/Desktop/sudoku-generator-master/sudoku-generator-master/sudoku_generator.py", line 14, in <module> difficulty = difficulties[sys.argv[2]] IndexError: list index out of range Process finished with exit code 1