Number Guessing Game - Build a Number Guessing Game

UPD
Hi, guys!
I’m still trying to solve it xd. I suspect that the problem is in this line “Your database should allow usernames of at least 22 characters”. For me it’s not very clear.
So the name should be more than 22 characters. SHould I make a check on it in the code and force user to insert correct username? Or username shoulde be from 1 to 22+ or from 0 to 22+, because I also noticed that the test trying to insert empty usernames, but it´s not specified if it’s allowed or not.
Either way I attach my code and the db here as git repo. I made a veeeeery simple db, just one table with unique not null username and integer best games and number of olayed games
Please help, maybe I missed something dumb but important
Thank youuuuuuuu T.T

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Challenge: Number Guessing Game - Build a Number Guessing Game

Link to the challenge:

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

1 Like

UPD
Hi, guys!
I’m still trying to solve it xd. I suspect that the problem is in this line “Your database should allow usernames of at least 22 characters”. For me it’s not very clear.
So the name should be more than 22 characters. SHould I make a check on it in the code and force user to insert correct username? Or username shoulde be from 1 to 22+ or from 0 to 22+, because I also noticed that the test trying to insert empty usernames, but it´s not specified if it’s allowed or not.
Either way I attach my code and the db here as git repo. I made a veeeeery simple db, just one table with unique not null username and integer best games and number of olayed games
Please help, maybe I missed something dumb but important
Thank youuuuuuuu T.T

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Challenge: Number Guessing Game - Build a Number Guessing Game

Link to the challenge:

Thanks my issued has resolved

what about mine issue T.T

Has someone complited it? I get different checkmarks on the same code everytime I run the test… this is not ok(((

Situation! When I count number of guesse, I have to make on 1 more, otherwise I’m not passing the " If that username has been used before, it should print Welcome back, <username>! You have played <games_played> games, and your best game took <best_game> guesses. , with <username> being a users name from the database, <games_played> being the total number of games that user has played, and <best_game> being the fewest number of guesses it took that user to win the game" step. But it counts wrong!!!
And I cant continue the step "
When the secret number is guessed, your script should print You guessed it in <number_of_guesses> tries. The secret number was <secret_number>. Nice job!"

Can someone please take a look at my code, what is wrong?