6th Feb 2018, 5:58 AM
Raphael Shay
Raphael Shay - avatar
3 Respuestas
+ 2
There is not guarantee that all the digits will be in the random number. Therefore, if you try to find something that is not there (which you do), str.index will throw a ValueError
6th Feb 2018, 6:20 AM
Amaras A
Amaras A - avatar
+ 1
How do I fix that?
6th Feb 2018, 10:08 AM
Raphael Shay
Raphael Shay - avatar
+ 1
you should check that, for each digit in the guess, it is first in the chosen number and then it is a the right position. either that or the other way around
6th Feb 2018, 5:30 PM
Amaras A
Amaras A - avatar