Feb-28-2018, 11:33 AM
(Feb-26-2018, 06:48 AM)ka06059 Wrote: your while loop wont print outI forgot that I wasn't comparing strings, which means the <= operator worked!After 1080 guesses...
with that!=
, try other comparison operator instead?
Does anybody know any formatting techniques that would cause the output to be four digits the whole time?
For instance, how could I turn this output:
Output:0 is not the correct combo. Trying next guess.
1 is not the correct combo. Trying next guess.
2 is not the correct combo. Trying next guess.
3 is not the correct combo. Trying next guess.
...
Into this output:Output:0000 is not the correct combo. Trying next guess.
0001 is not the correct combo. Trying next guess.
0002 is not the correct combo. Trying next guess.
0003 is not the correct combo. Trying next guess.
...