Number Guessing Game - Build a Number Guessing Game Relational DataBase

I have an issue with the script SUBTASKS 1.1 :8 Your script should print the correct welcome message for returning users

everything is accurate but still gets this error

same scenario with "When the secret number is guessed, your script should print "

I have wrapped my head around this for long time now. But to no avail.

I am not sure if I am doing something wrong here.


Any help will be greatly appreciated

I think the test value used by the script does not include the same user more than once

Hey @mishel.kz, can you share a dump of your database and the script you are using? I will take a look.

Not quite sure what the problem is. One thing that might be an issue is that the data may need to come from the database or something - so if you hard code any of the user information, it may not pass.

Thank you for your reply. Please find repo with dump.

Your script doesn’t seem to be working quite right for me @mishel.kzk. I used what you shared in that repo and ran it a few times, here’s what I see…

So there seems to be an issue with how you are saving how many guesses a game takes. Your test user says they have a game that took 15 guesses, not sure if I was doing something different or how you got it saved like that. In your screen shot, it says you played a game that took zero guesses - so something isn’t quite right. I would look into that and see if you can get it saving correctly. I think that will get that test to pass. Let us know if you are still unable to get it.

Technically, your script does print what the user story asks for there. I’ll look into the wording of that and the test to see if I can make things a little more clear.

Edit: Actually, when I ran the tests, that second one passed for me - the When the secret number is guesses... one.

Thank you so much for your help. I have passed the test. I think it was part of the code that with sql query to insert value that was giving me the trouble.

Anyways Yaaay! My first certificate. :sweat_smile:

1 Like

Congratulations @mishel.kzk :tada: If you give it a tweet, I will retweet it :wink: