Build a Number Guessing Game - Support Requested

Hi all, I’m having trouble getting my project to pass all the tests. “SUBTASKS 1.1 :8 Your script should print the correct welcome message for returning users” consistently fails, and I’m not sure what’s going on. I checked other topics for this issue, and I could not identify what exactly is making my script or database fail these checks.

Testing by hand, it seems to work, and I haven’t come across any bugs, but perhaps I am missing something. I also tried just hitting “Run” several dozen times (lol) but nothing worked.

Here is a GitHub repo containing the Bash script and PostgreSQL db dump.

Let me know if there’s anything else I can provide. Thanks!

Test is failing due to expecting different number of tries, which took to guess, to be printed. The way test is detecting that number is a little tricky and sometimes expected is different number that it should be.

Two things that currently impacts the discrepancy between expected and actual number of guesses:

  • Printing Guess the secret number between 1 and 1000: after each guess
  • Not counting inputting not an integer as a guess

Thanks so much! Moving “Guess the secret number between 1 and 1000:” out of the while loop and counting invalid guesses seems to have worked, as it passed the tests that were giving me trouble. I really appreciate it.