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 get the following error:
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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 ]] |
1 2 3 4 5 6 |
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 |